結果
問題 |
No.698 ペアでチームを作ろう
|
ユーザー |
|
提出日時 | 2022-04-13 17:42:46 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 296 bytes |
コンパイル時間 | 188 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 16,000 KB |
最終ジャッジ日時 | 2024-12-23 15:59:09 |
合計ジャッジ時間 | 2,905 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 2 WA * 10 |
ソースコード
import sys sys.setrecursionlimit(10000) n=int(input()) a=list(map(int,input().split())) ans=[] def f(l,now): global ans if len(l)==2: now+=l[0]^l[1] ans.append(now) return for i in range(1,len(l)): f(l[1:i]+l[i+1:],now+l[0]^l[i]) f(a,0) print(max(ans))