結果
| 問題 |
No.698 ペアでチームを作ろう
|
| ユーザー |
H20
|
| 提出日時 | 2021-05-27 09:44:43 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 374 bytes |
| コンパイル時間 | 883 ms |
| コンパイル使用メモリ | 82,148 KB |
| 実行使用メモリ | 200,024 KB |
| 最終ジャッジ日時 | 2024-11-06 05:41:56 |
| 合計ジャッジ時間 | 3,471 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 2 TLE * 1 -- * 9 |
ソースコード
import itertools
N = int(input())
A = list(map(int,input().split()))
C = list(itertools.combinations(range(N), N//2))
ans = 0
for c in C:
r = list(range(N))
for i in c:
r.remove(i)
P = list(itertools.permutations(r))
for p in P:
power=0
for i in range(N//2):
power+=A[c[i]]^A[p[i]]
ans = max(power,ans)
print(ans)
H20