結果

問題 No.698 ペアでチームを作ろう
ユーザー lllllll88938494lllllll88938494
提出日時 2022-09-22 20:41:50
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 229 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 78,732 KB
最終ジャッジ日時 2023-08-23 20:37:53
合計ジャッジ時間 4,316 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 151 ms
78,268 KB
testcase_01 AC 141 ms
78,532 KB
testcase_02 AC 206 ms
78,236 KB
testcase_03 AC 136 ms
78,556 KB
testcase_04 AC 208 ms
78,392 KB
testcase_05 AC 239 ms
78,276 KB
testcase_06 AC 232 ms
78,484 KB
testcase_07 AC 225 ms
78,344 KB
testcase_08 AC 225 ms
78,292 KB
testcase_09 AC 239 ms
78,648 KB
testcase_10 AC 224 ms
78,080 KB
testcase_11 AC 239 ms
78,456 KB
testcase_12 WA -
testcase_13 AC 243 ms
78,628 KB
testcase_14 AC 228 ms
78,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from random import shuffle
n=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(100000):
    shuffle(a)
    cnt=0
    for i in range(0,n,2):
        cnt+= a[i]^a[i+1]

    ans=max(ans,cnt)
        
print(ans)     
0