結果
| 問題 |
No.183 たのしい排他的論理和(EASY)
|
| コンテスト | |
| ユーザー |
学ぶマン
|
| 提出日時 | 2025-10-28 21:05:55 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 323 bytes |
| コンパイル時間 | 431 ms |
| コンパイル使用メモリ | 82,188 KB |
| 実行使用メモリ | 83,224 KB |
| 最終ジャッジ日時 | 2025-10-28 21:06:07 |
| 合計ジャッジ時間 | 9,414 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 RE * 3 |
ソースコード
N = int(input())
A = list(map(int, input().split()))
limit = 2**14
DP = [False] * (limit + 1)
DP[0] = True
for i in range(N):
a = A[i]
nDP = [False] * (limit + 1)
for j in range(limit + 1):
if DP[j]:
nDP[j] = True
nDP[j ^ a] = True
DP = nDP
ans = DP.count(True)
print(ans)
学ぶマン