結果
問題 | No.183 たのしい排他的論理和(EASY) |
ユーザー | kiccho1101 |
提出日時 | 2022-04-23 18:47:40 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 368 bytes |
コンパイル時間 | 421 ms |
コンパイル使用メモリ | 86,884 KB |
実行使用メモリ | 264,748 KB |
最終ジャッジ日時 | 2023-09-07 11:11:41 |
合計ジャッジ時間 | 7,872 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 82 ms
79,112 KB |
testcase_01 | AC | 92 ms
81,608 KB |
testcase_02 | AC | 120 ms
87,064 KB |
testcase_03 | AC | 109 ms
85,496 KB |
testcase_04 | AC | 87 ms
79,800 KB |
testcase_05 | AC | 120 ms
87,600 KB |
testcase_06 | AC | 97 ms
82,228 KB |
testcase_07 | TLE | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
ソースコード
N = int(input()) A = list(map(int, input().split())) # dp[i][j]: i番目までの数字でjにできるかどうか dp = [False] * (10 ** 5 + 1) dp[0] = True for i in range(N): ndp = [False] * (10 ** 5 + 1) for j in range(10 ** 5 + 1): ndp[j] = dp[j] if j ^ A[i] < 10 ** 5 + 1: ndp[j] |= dp[j ^ A[i]] dp = ndp print(sum(dp))