結果

問題 No.698 ペアでチームを作ろう
ユーザー lllllll88938494lllllll88938494
提出日時 2022-09-22 20:41:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 228 bytes
コンパイル時間 661 ms
コンパイル使用メモリ 10,700 KB
実行使用メモリ 8,888 KB
最終ジャッジ日時 2023-08-23 20:37:48
合計ジャッジ時間 5,539 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 151 ms
8,668 KB
testcase_01 AC 102 ms
8,768 KB
testcase_02 AC 278 ms
8,796 KB
testcase_03 AC 106 ms
8,652 KB
testcase_04 AC 320 ms
8,664 KB
testcase_05 AC 358 ms
8,664 KB
testcase_06 AC 362 ms
8,656 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 363 ms
8,888 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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