結果

問題 No.184 たのしい排他的論理和(HARD)
ユーザー yaoshimaxyaoshimax
提出日時 2015-05-10 11:34:39
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 505 bytes
コンパイル時間 624 ms
コンパイル使用メモリ 6,524 KB
実行使用メモリ 16,104 KB
最終ジャッジ日時 2023-09-17 16:51:26
合計ジャッジ時間 38,842 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,856 KB
testcase_01 AC 11 ms
5,892 KB
testcase_02 AC 11 ms
6,000 KB
testcase_03 RE -
testcase_04 AC 11 ms
5,924 KB
testcase_05 AC 11 ms
5,936 KB
testcase_06 RE -
testcase_07 AC 11 ms
5,896 KB
testcase_08 AC 1,453 ms
13,156 KB
testcase_09 AC 269 ms
7,300 KB
testcase_10 AC 1,065 ms
11,424 KB
testcase_11 AC 716 ms
9,704 KB
testcase_12 AC 1,790 ms
14,328 KB
testcase_13 AC 1,947 ms
14,940 KB
testcase_14 AC 999 ms
10,964 KB
testcase_15 AC 2,376 ms
15,780 KB
testcase_16 AC 1,874 ms
14,040 KB
testcase_17 AC 1,861 ms
14,816 KB
testcase_18 AC 12 ms
5,888 KB
testcase_19 AC 11 ms
5,896 KB
testcase_20 AC 78 ms
9,672 KB
testcase_21 AC 2,180 ms
16,044 KB
testcase_22 AC 2,235 ms
16,104 KB
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 AC 1,214 ms
11,916 KB
testcase_29 AC 1,793 ms
14,436 KB
testcase_30 AC 1,481 ms
13,528 KB
testcase_31 AC 1,278 ms
12,428 KB
testcase_32 AC 1,664 ms
14,168 KB
testcase_33 AC 2,150 ms
15,836 KB
testcase_34 AC 2,166 ms
15,676 KB
testcase_35 AC 2,282 ms
15,992 KB
testcase_36 AC 2,234 ms
15,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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
0