結果
問題 |
No.184 たのしい排他的論理和(HARD)
|
ユーザー |
![]() |
提出日時 | 2015-04-17 14:29:57 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 223 ms / 5,000 ms |
コード長 | 288 bytes |
コンパイル時間 | 767 ms |
コンパイル使用メモリ | 82,068 KB |
実行使用メモリ | 93,260 KB |
最終ジャッジ日時 | 2024-07-04 11:24:26 |
合計ジャッジ時間 | 5,928 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 34 |
ソースコード
n = int(input()) a = list(map(int, input().split())) ret = 0 for i in range(n): if a[i]: ret += 1 x = 0 while (2**(x+1)) <= a[i]: x += 1 for y in range(i+1, n, 1): if a[y] & (2 ** x): a[y] ^= a[i] print(2**ret)