結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 229 ms
78,004 KB
testcase_01 AC 181 ms
78,516 KB
testcase_02 AC 386 ms
78,544 KB
testcase_03 AC 185 ms
78,512 KB
testcase_04 AC 432 ms
78,296 KB
testcase_05 AC 462 ms
78,320 KB
testcase_06 AC 454 ms
78,440 KB
testcase_07 AC 457 ms
78,280 KB
testcase_08 AC 460 ms
78,328 KB
testcase_09 AC 453 ms
78,372 KB
testcase_10 AC 447 ms
78,652 KB
testcase_11 WA -
testcase_12 AC 435 ms
78,376 KB
testcase_13 AC 435 ms
78,256 KB
testcase_14 AC 425 ms
78,052 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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