結果
問題 |
No.183 たのしい排他的論理和(EASY)
|
ユーザー |
|
提出日時 | 2020-11-29 19:07:48 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 315 bytes |
コンパイル時間 | 485 ms |
コンパイル使用メモリ | 82,140 KB |
実行使用メモリ | 80,016 KB |
最終ジャッジ日時 | 2024-09-13 02:04:12 |
合計ジャッジ時間 | 8,584 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 RE * 3 |
ソースコード
import sys readline = sys.stdin.readline N = int(readline()) A = list(map(int,readline().split())) SIZE = 2 ** 14 + 1 dp = [False] * (SIZE) dp[0] = True for i in range(len(A)): newdp = dp.copy() for j in range(len(dp)): if not dp[j]: continue newdp[j ^ A[i]] = True dp = newdp print(sum(dp))