結果
問題 |
No.1082 XORのXOR
|
ユーザー |
![]() |
提出日時 | 2020-01-28 23:06:06 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 281 bytes |
コンパイル時間 | 221 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 16,128 KB |
最終ジャッジ日時 | 2024-09-16 02:28:23 |
合計ジャッジ時間 | 4,023 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | TLE * 1 -- * 28 |
ソースコード
# O(N!)愚直 n=int(input()) a=list(map(int,input().split())) from itertools import permutations ans=0 for aa in permutations(a,n): b=[] for i in range(n-1): b.append(aa[i]^aa[i+1]) m=b[0] for i in range(1,n-1): m^=b[i] ans=max(ans,m) print(ans)