結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 188 ms
78,268 KB
testcase_01 AC 154 ms
78,552 KB
testcase_02 AC 295 ms
78,432 KB
testcase_03 AC 154 ms
78,408 KB
testcase_04 AC 315 ms
78,404 KB
testcase_05 AC 335 ms
78,440 KB
testcase_06 AC 331 ms
78,420 KB
testcase_07 AC 336 ms
78,472 KB
testcase_08 AC 333 ms
78,384 KB
testcase_09 AC 346 ms
78,260 KB
testcase_10 AC 341 ms
78,180 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 331 ms
78,812 KB
testcase_14 AC 339 ms
78,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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