結果
問題 | No.183 たのしい排他的論理和(EASY) |
ユーザー |
|
提出日時 | 2018-08-19 08:36:43 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 670 ms / 5,000 ms |
コード長 | 243 bytes |
コンパイル時間 | 161 ms |
コンパイル使用メモリ | 82,008 KB |
実行使用メモリ | 64,464 KB |
最終ジャッジ日時 | 2024-07-01 03:50:29 |
合計ジャッジ時間 | 6,399 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
n = int(input()) a = list(map(int, input().split())) dp = [0] * (1 << 15) dp[0] = 1 for i in range(n): for j in range(1 << 15): dp[a[i] ^ j] |= dp[j] num = 0 for j in range(1 << 15): if dp[j] == 1: num += 1 print(num)