結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー n_knuun_knuu
提出日時 2016-05-23 23:04:36
言語 Nim
(2.0.0)
結果
AC  
実行時間 568 ms / 5,000 ms
コード長 236 bytes
コンパイル時間 3,110 ms
コンパイル使用メモリ 71,456 KB
実行使用メモリ 9,356 KB
最終ジャッジ日時 2023-09-12 00:42:46
合計ジャッジ時間 8,190 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,836 KB
testcase_01 AC 4 ms
6,432 KB
testcase_02 AC 6 ms
7,192 KB
testcase_03 AC 5 ms
7,168 KB
testcase_04 AC 3 ms
5,376 KB
testcase_05 AC 6 ms
7,492 KB
testcase_06 AC 5 ms
7,068 KB
testcase_07 AC 530 ms
8,540 KB
testcase_08 AC 507 ms
8,144 KB
testcase_09 AC 351 ms
9,196 KB
testcase_10 AC 416 ms
9,064 KB
testcase_11 AC 542 ms
8,148 KB
testcase_12 AC 6 ms
7,672 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 529 ms
8,384 KB
testcase_15 AC 568 ms
8,376 KB
testcase_16 AC 5 ms
7,216 KB
testcase_17 AC 129 ms
8,376 KB
testcase_18 AC 508 ms
8,148 KB
testcase_19 AC 67 ms
9,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import strutils, sequtils, math
discard stdin.readline
var dp = newSeqWith(32768, 0)
dp[0] = 1
for a in stdin.readline.split.map(parseInt):
  var ndp = dp
  for i in 0..<32768:
    if dp[i] == 1: ndp[i xor a] = 1
  dp = ndp
dp.sum.echo
0