結果
| 問題 | No.4 おもりと天秤 |
| コンテスト | |
| ユーザー |
6soukiti29
|
| 提出日時 | 2017-07-05 19:33:38 |
| 言語 | Nim (2.2.8) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 384 bytes |
| 記録 | |
| コンパイル時間 | 2,590 ms |
| コンパイル使用メモリ | 68,840 KB |
| 実行使用メモリ | 6,144 KB |
| 最終ジャッジ日時 | 2026-03-19 18:11:15 |
| 合計ジャッジ時間 | 3,633 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 10 |
ソースコード
import sequtils,strutils,math
var
N = stdin.readline.parseInt
W : seq[int]
W = stdin.readline.split.map(parseInt)
var A = newSeqWith(sum(W) div 2 + 2,false)
A[0] = true
for w in W:
for i in countdown(sum(W) div 2 + 1,w):
if A[i - w] == true:
A[i] = true
if sum(W) mod 2 == 0 and A[sum(W) div 2] == true:
echo "possible"
else:
echo "imposible"
6soukiti29