結果

問題 No.130 XOR Minimax
ユーザー roiti46roiti46
提出日時 2015-02-25 16:46:34
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 216 bytes
コンパイル時間 533 ms
コンパイル使用メモリ 6,728 KB
実行使用メモリ 14,520 KB
最終ジャッジ日時 2023-09-06 04:33:21
合計ジャッジ時間 6,096 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 11 ms
5,876 KB
testcase_02 AC 11 ms
5,932 KB
testcase_03 AC 11 ms
5,948 KB
testcase_04 AC 271 ms
7,364 KB
testcase_05 AC 382 ms
14,520 KB
testcase_06 AC 282 ms
14,432 KB
testcase_07 WA -
testcase_08 AC 343 ms
14,452 KB
testcase_09 AC 52 ms
6,920 KB
testcase_10 AC 73 ms
7,708 KB
testcase_11 WA -
testcase_12 AC 31 ms
6,328 KB
testcase_13 AC 191 ms
11,500 KB
testcase_14 AC 288 ms
13,172 KB
testcase_15 AC 14 ms
5,932 KB
testcase_16 AC 206 ms
10,852 KB
testcase_17 AC 189 ms
10,832 KB
testcase_18 AC 221 ms
11,436 KB
testcase_19 AC 258 ms
12,692 KB
testcase_20 AC 133 ms
9,004 KB
testcase_21 AC 269 ms
13,008 KB
testcase_22 WA -
testcase_23 AC 28 ms
6,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(raw_input())
a = map(int,raw_input().split())
mn = max(a)
x = 0
for i in xrange(30,-1,-1):
    xx = x | (1 << i)
    if max(ai^xx for ai in a) < mn:
        mn = max(ai^xx for ai in a)
        x = xx
print mn
0