結果

問題 No.1082 XORのXOR
ユーザー buey_tbuey_t
提出日時 2023-04-16 10:32:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 145 ms / 2,000 ms
コード長 964 bytes
コンパイル時間 255 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 90,720 KB
最終ジャッジ日時 2024-04-20 02:19:20
合計ジャッジ時間 5,560 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
85,248 KB
testcase_01 AC 106 ms
85,068 KB
testcase_02 AC 113 ms
85,248 KB
testcase_03 AC 130 ms
90,540 KB
testcase_04 AC 139 ms
90,368 KB
testcase_05 AC 132 ms
90,332 KB
testcase_06 AC 140 ms
90,376 KB
testcase_07 AC 131 ms
90,428 KB
testcase_08 AC 141 ms
90,412 KB
testcase_09 AC 133 ms
90,720 KB
testcase_10 AC 139 ms
90,360 KB
testcase_11 AC 129 ms
90,356 KB
testcase_12 AC 138 ms
90,380 KB
testcase_13 AC 132 ms
90,408 KB
testcase_14 AC 145 ms
90,436 KB
testcase_15 AC 138 ms
90,388 KB
testcase_16 AC 139 ms
90,424 KB
testcase_17 AC 131 ms
90,324 KB
testcase_18 AC 137 ms
90,368 KB
testcase_19 AC 128 ms
90,328 KB
testcase_20 AC 135 ms
90,240 KB
testcase_21 AC 129 ms
90,268 KB
testcase_22 AC 140 ms
90,588 KB
testcase_23 AC 128 ms
90,556 KB
testcase_24 AC 138 ms
90,436 KB
testcase_25 AC 128 ms
90,508 KB
testcase_26 AC 137 ms
90,240 KB
testcase_27 AC 129 ms
90,372 KB
testcase_28 AC 116 ms
85,384 KB
testcase_29 AC 108 ms
85,196 KB
testcase_30 AC 117 ms
85,216 KB
testcase_31 AC 116 ms
85,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import sqrt,sin,cos,tan,ceil,radians,floor,gcd,exp,log,log10,log2,factorial,fsum
from heapq import heapify, heappop, heappush
from bisect import bisect_left, bisect_right
from copy import deepcopy
import copy
import random
from collections import deque,Counter,defaultdict
from itertools import permutations,combinations
from decimal import Decimal,ROUND_HALF_UP
#tmp = Decimal(mid).quantize(Decimal('0'), rounding=ROUND_HALF_UP)
from functools import lru_cache, reduce
#@lru_cache(maxsize=None)
from operator import add,sub,mul,xor,and_,or_,itemgetter
INF = 10**18
mod1 = 10**9+7
mod2 = 998244353

#DecimalならPython
#再帰ならPython!!!!!!!!!!!!!!!!!!!!!!!!!!


'''
両端以外を2回とる


'''

N = int(input())
A = list(map(int, input().split()))

tmp = A[0]^A[0]
for i in range(1,N):
    tmp ^= A[i]
    tmp ^= A[i]

ans = 0
for i in range(N):
    for j in range(i+1,N):
        ans = max(ans,tmp^A[i]^A[j])

print(ans)






















0