結果

問題 No.1082 XORのXOR
ユーザー FromBooskaFromBooska
提出日時 2023-02-14 20:22:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 337 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 76,928 KB
最終ジャッジ日時 2023-09-24 08:12:24
合計ジャッジ時間 5,526 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,296 KB
testcase_01 AC 74 ms
71,432 KB
testcase_02 AC 78 ms
71,044 KB
testcase_03 AC 88 ms
76,644 KB
testcase_04 AC 87 ms
76,744 KB
testcase_05 AC 88 ms
76,784 KB
testcase_06 AC 87 ms
76,756 KB
testcase_07 AC 88 ms
76,588 KB
testcase_08 AC 87 ms
76,812 KB
testcase_09 AC 88 ms
76,824 KB
testcase_10 AC 86 ms
76,892 KB
testcase_11 AC 87 ms
76,744 KB
testcase_12 AC 87 ms
76,716 KB
testcase_13 AC 85 ms
76,816 KB
testcase_14 AC 86 ms
76,896 KB
testcase_15 AC 88 ms
76,520 KB
testcase_16 AC 86 ms
76,888 KB
testcase_17 AC 92 ms
76,828 KB
testcase_18 AC 87 ms
76,776 KB
testcase_19 AC 86 ms
76,744 KB
testcase_20 AC 88 ms
76,772 KB
testcase_21 AC 87 ms
76,600 KB
testcase_22 AC 85 ms
76,928 KB
testcase_23 AC 86 ms
76,884 KB
testcase_24 AC 86 ms
76,872 KB
testcase_25 AC 84 ms
76,780 KB
testcase_26 AC 86 ms
76,640 KB
testcase_27 AC 88 ms
76,656 KB
testcase_28 AC 75 ms
71,036 KB
testcase_29 AC 75 ms
71,040 KB
testcase_30 AC 75 ms
71,312 KB
testcase_31 AC 73 ms
71,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# X = B1^B2^---^Bn-1 = A1^A2^A2^A3^----^An-1^An-1^An = A1^An
# つまり間の項は全部打ち消しあい、A1^Anだけが残る、その最大値が答え

N = int(input())
A = list(map(int, input().split()))
ans = 0
for i in range(N):
    for j in range(i+1, N):
        ans = max(ans, A[i]^A[j])
print(ans)
0