結果
問題 | No.699 ペアでチームを作ろう2 |
ユーザー |
|
提出日時 | 2018-06-13 09:50:08 |
言語 | PyPy2 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 439 bytes |
コンパイル時間 | 2,244 ms |
コンパイル使用メモリ | 76,296 KB |
実行使用メモリ | 78,868 KB |
最終ジャッジ日時 | 2024-06-30 14:04:29 |
合計ジャッジ時間 | 18,192 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 1 WA * 1 TLE * 10 |
ソースコード
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