結果
| 問題 |
No.184 たのしい排他的論理和(HARD)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-03 15:31:52 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 1,556 ms / 5,000 ms |
| コード長 | 221 bytes |
| コンパイル時間 | 519 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 16,584 KB |
| 最終ジャッジ日時 | 2024-07-04 12:20:51 |
| 合計ジャッジ時間 | 27,387 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
#yuki_184
n=int(raw_input())
a=map(int,raw_input().split())
res=0
for i in xrange(n):
if a[i]:
res+=1
x=0
while (2**(x+1))<=a[i]:
x+=1
for y in xrange(i+1,n):
if a[y] & (2**x):
a[y]^=a[i]
print 2**res