結果

問題 No.184 たのしい排他的論理和(HARD)
ユーザー rpy3cpprpy3cpp
提出日時 2015-04-17 15:51:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 205 ms / 5,000 ms
コード長 253 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 87,216 KB
実行使用メモリ 104,068 KB
最終ジャッジ日時 2023-09-17 16:40:36
合計ジャッジ時間 7,143 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,276 KB
testcase_01 AC 77 ms
71,140 KB
testcase_02 AC 79 ms
75,288 KB
testcase_03 AC 76 ms
71,188 KB
testcase_04 AC 77 ms
71,384 KB
testcase_05 AC 77 ms
71,192 KB
testcase_06 AC 76 ms
71,280 KB
testcase_07 AC 77 ms
71,212 KB
testcase_08 AC 166 ms
95,688 KB
testcase_09 AC 103 ms
78,372 KB
testcase_10 AC 151 ms
91,036 KB
testcase_11 AC 129 ms
85,432 KB
testcase_12 AC 179 ms
100,484 KB
testcase_13 AC 183 ms
100,860 KB
testcase_14 AC 139 ms
90,820 KB
testcase_15 AC 199 ms
103,440 KB
testcase_16 AC 173 ms
98,064 KB
testcase_17 AC 181 ms
100,968 KB
testcase_18 AC 80 ms
76,112 KB
testcase_19 AC 77 ms
71,100 KB
testcase_20 AC 90 ms
82,108 KB
testcase_21 AC 197 ms
103,832 KB
testcase_22 AC 197 ms
103,596 KB
testcase_23 AC 79 ms
75,740 KB
testcase_24 AC 78 ms
71,284 KB
testcase_25 AC 81 ms
76,020 KB
testcase_26 AC 78 ms
71,280 KB
testcase_27 AC 77 ms
71,164 KB
testcase_28 AC 150 ms
93,052 KB
testcase_29 AC 190 ms
100,600 KB
testcase_30 AC 169 ms
98,112 KB
testcase_31 AC 156 ms
94,800 KB
testcase_32 AC 181 ms
99,828 KB
testcase_33 AC 197 ms
103,744 KB
testcase_34 AC 205 ms
104,068 KB
testcase_35 AC 202 ms
103,416 KB
testcase_36 AC 203 ms
103,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(set(map(int, input().split())))
N = len(A)
rank = 0
Ar = max(A)
while Ar:
    rank += 1
    index = 1 << (len(bin(Ar)) - 3)
    for i in range(N):
        if A[i] & index:
            A[i] ^= Ar
    Ar = max(A)
print(1 << rank)
0