結果
問題 | No.183 たのしい排他的論理和(EASY) |
ユーザー | ああいい |
提出日時 | 2022-03-17 23:49:24 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,823 ms / 5,000 ms |
コード長 | 219 bytes |
コンパイル時間 | 159 ms |
コンパイル使用メモリ | 82,344 KB |
実行使用メモリ | 260,388 KB |
最終ジャッジ日時 | 2024-10-01 22:40:38 |
合計ジャッジ時間 | 13,193 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
N = int(input()) A = list(map(int,input().split())) C = 1 << 15 dp = [0] * (C + 1) dp[0] = 1 for a in A: nx = dp.copy() for i in range(C+1): if dp[i]: nx[i^a] = 1 dp = nx print(sum(dp))