結果
問題 | No.699 ペアでチームを作ろう2 |
ユーザー | nebukuro09 |
提出日時 | 2018-06-13 09:50:08 |
言語 | PyPy2 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 439 bytes |
コンパイル時間 | 1,856 ms |
コンパイル使用メモリ | 77,672 KB |
実行使用メモリ | 79,944 KB |
最終ジャッジ日時 | 2023-09-13 03:50:55 |
合計ジャッジ時間 | 18,719 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 74 ms
76,360 KB |
testcase_01 | AC | 74 ms
76,208 KB |
testcase_02 | WA | - |
testcase_03 | AC | 73 ms
76,328 KB |
testcase_04 | WA | - |
testcase_05 | TLE | - |
testcase_06 | TLE | - |
testcase_07 | TLE | - |
testcase_08 | TLE | - |
testcase_09 | TLE | - |
testcase_10 | TLE | - |
testcase_11 | TLE | - |
testcase_12 | TLE | - |
testcase_13 | TLE | - |
testcase_14 | TLE | - |
ソースコード
from itertools import combinations, permutations N = input() A = sorted(map(int, raw_input().split())) ans = 0 for c in combinations(range(N), N/2): X = [] Y = [] for i in xrange(N): if i in c: X.append(A[i]) else: Y.append(A[i]) for p in permutations(X): tmp = 0 for i in xrange(N/2): tmp ^= X[i] + Y[i] ans = max(ans, tmp) print ans