結果
| 問題 | No.184 たのしい排他的論理和(HARD) |
| コンテスト | |
| ユーザー |
yaoshimax
|
| 提出日時 | 2015-05-10 11:34:39 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 505 bytes |
| 記録 | |
| コンパイル時間 | 120 ms |
| コンパイル使用メモリ | 77,528 KB |
| 最終ジャッジ日時 | 2025-12-03 15:06:01 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 RE * 7 |
ソースコード
N=int(raw_input())
A=map(int,raw_input().split())
leftmost=60
ind=0
while leftmost>=0:
A.sort()
A.reverse()
#for a in A:
# print format(a,'b')
#print
while leftmost>=0 and (A[ind]&(1<<leftmost))==0:
leftmost-=1
if leftmost<0:
break
#print ind,":",leftmost,"...",(1<<leftmost),"&",A[ind]
for i in range(N):
if i==ind:
continue
if (A[i] &(1<<leftmost)) !=0:
A[i]^=A[ind]
ind+=1
leftmost-=1
print 1<<ind
yaoshimax