結果

問題 No.698 ペアでチームを作ろう
ユーザー lllllll88938494lllllll88938494
提出日時 2022-09-22 20:42:24
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 229 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 77,312 KB
最終ジャッジ日時 2024-06-01 18:01:12
合計ジャッジ時間 3,690 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
76,572 KB
testcase_01 AC 94 ms
76,672 KB
testcase_02 AC 167 ms
76,756 KB
testcase_03 AC 93 ms
76,580 KB
testcase_04 AC 181 ms
76,800 KB
testcase_05 AC 199 ms
76,776 KB
testcase_06 AC 193 ms
76,672 KB
testcase_07 AC 191 ms
76,636 KB
testcase_08 AC 202 ms
77,312 KB
testcase_09 AC 196 ms
76,792 KB
testcase_10 WA -
testcase_11 AC 208 ms
76,800 KB
testcase_12 AC 202 ms
77,056 KB
testcase_13 WA -
testcase_14 AC 193 ms
76,824 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