結果
| 問題 | No.183 たのしい排他的論理和(EASY) |
| コンテスト | |
| ユーザー |
koheijkt
|
| 提出日時 | 2025-10-28 21:05:55 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 323 bytes |
| 記録 | |
| コンパイル時間 | 237 ms |
| コンパイル使用メモリ | 96,108 KB |
| 実行使用メモリ | 93,184 KB |
| 最終ジャッジ日時 | 2026-07-16 01:01:19 |
| 合計ジャッジ時間 | 7,410 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)
koheijkt