結果

問題 No.1082 XORのXOR
ユーザー yuly3yuly3
提出日時 2020-07-30 22:44:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 147 ms / 2,000 ms
コード長 324 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 87,224 KB
実行使用メモリ 77,112 KB
最終ジャッジ日時 2023-09-18 06:09:59
合計ジャッジ時間 5,902 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,484 KB
testcase_01 AC 72 ms
71,504 KB
testcase_02 AC 69 ms
71,568 KB
testcase_03 AC 144 ms
76,876 KB
testcase_04 AC 143 ms
76,952 KB
testcase_05 AC 143 ms
76,920 KB
testcase_06 AC 144 ms
76,916 KB
testcase_07 AC 144 ms
76,968 KB
testcase_08 AC 146 ms
76,924 KB
testcase_09 AC 145 ms
76,916 KB
testcase_10 AC 146 ms
76,876 KB
testcase_11 AC 147 ms
76,848 KB
testcase_12 AC 145 ms
76,880 KB
testcase_13 AC 144 ms
76,968 KB
testcase_14 AC 144 ms
76,856 KB
testcase_15 AC 143 ms
77,040 KB
testcase_16 AC 143 ms
76,664 KB
testcase_17 AC 146 ms
76,720 KB
testcase_18 AC 145 ms
77,000 KB
testcase_19 AC 145 ms
76,912 KB
testcase_20 AC 144 ms
76,984 KB
testcase_21 AC 144 ms
76,980 KB
testcase_22 AC 145 ms
77,112 KB
testcase_23 AC 144 ms
77,028 KB
testcase_24 AC 144 ms
76,724 KB
testcase_25 AC 146 ms
76,968 KB
testcase_26 AC 144 ms
76,968 KB
testcase_27 AC 143 ms
77,084 KB
testcase_28 AC 71 ms
71,192 KB
testcase_29 AC 71 ms
71,660 KB
testcase_30 AC 71 ms
71,644 KB
testcase_31 AC 73 ms
71,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from itertools import combinations

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    N = int(rl())
    A = list(map(int, rl().split()))
    
    ans = 0
    for i, j in combinations(range(N), 2):
        ans = max(ans, A[i] ^ A[j])
    print(ans)


if __name__ == '__main__':
    solve()
0