結果

問題 No.184 たのしい排他的論理和(HARD)
ユーザー yaoshimaxyaoshimax
提出日時 2015-05-10 11:36:55
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 318 ms / 5,000 ms
コード長 516 bytes
コンパイル時間 436 ms
コンパイル使用メモリ 77,928 KB
実行使用メモリ 116,768 KB
最終ジャッジ日時 2023-09-17 16:50:24
合計ジャッジ時間 8,970 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
76,404 KB
testcase_01 AC 73 ms
76,380 KB
testcase_02 AC 75 ms
76,512 KB
testcase_03 AC 73 ms
76,376 KB
testcase_04 AC 74 ms
76,488 KB
testcase_05 AC 74 ms
76,180 KB
testcase_06 AC 74 ms
76,264 KB
testcase_07 AC 74 ms
76,064 KB
testcase_08 AC 247 ms
106,552 KB
testcase_09 AC 116 ms
80,012 KB
testcase_10 AC 210 ms
95,580 KB
testcase_11 AC 172 ms
90,660 KB
testcase_12 AC 280 ms
112,300 KB
testcase_13 AC 291 ms
113,420 KB
testcase_14 AC 203 ms
94,696 KB
testcase_15 AC 305 ms
115,400 KB
testcase_16 AC 273 ms
110,996 KB
testcase_17 AC 284 ms
113,776 KB
testcase_18 AC 76 ms
77,864 KB
testcase_19 AC 74 ms
76,476 KB
testcase_20 AC 90 ms
86,416 KB
testcase_21 AC 318 ms
115,348 KB
testcase_22 AC 316 ms
116,212 KB
testcase_23 AC 81 ms
78,880 KB
testcase_24 AC 74 ms
76,416 KB
testcase_25 AC 76 ms
77,716 KB
testcase_26 AC 74 ms
76,124 KB
testcase_27 AC 77 ms
76,388 KB
testcase_28 AC 222 ms
97,496 KB
testcase_29 AC 279 ms
111,620 KB
testcase_30 AC 248 ms
107,736 KB
testcase_31 AC 229 ms
100,956 KB
testcase_32 AC 264 ms
109,944 KB
testcase_33 AC 310 ms
114,712 KB
testcase_34 AC 305 ms
114,552 KB
testcase_35 AC 314 ms
116,416 KB
testcase_36 AC 312 ms
116,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(raw_input())
A=map(int,raw_input().split())
leftmost=60
ind=0
while leftmost>=0 and ind <N:
    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
0