結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 154 ms
78,252 KB
testcase_01 AC 136 ms
78,288 KB
testcase_02 AC 203 ms
78,576 KB
testcase_03 AC 140 ms
78,508 KB
testcase_04 AC 219 ms
78,624 KB
testcase_05 AC 229 ms
78,336 KB
testcase_06 AC 232 ms
78,352 KB
testcase_07 AC 232 ms
78,012 KB
testcase_08 AC 233 ms
78,384 KB
testcase_09 AC 230 ms
78,224 KB
testcase_10 WA -
testcase_11 AC 222 ms
78,496 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 225 ms
78,248 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