結果

問題 No.698 ペアでチームを作ろう
ユーザー jiromaru
提出日時 2018-06-19 19:47:42
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
TLE  
実行時間 -
コード長 499 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 783 ms
コンパイル使用メモリ 20,828 KB
実行使用メモリ 1,445,512 KB
最終ジャッジ日時 2026-03-20 23:49:55
合計ジャッジ時間 6,870 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 TLE * 1
other AC * 1 MLE * 2 -- * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import itertools
N = int(input())
first = input()
binary_list=[]
split_first = first.split()
cnt=round(N/2)
word_list1=list(itertools.combinations(split_first,2))
word_list2=list(itertools.combinations(word_list1,cnt))
for i in word_list2:
    chk_list=[]
    binary=0
    for j in i:
        binary+=int((bin(int(j[0])^int(j[1]))),2)

        for k in j:
            chk_list.append(k)
        
    if len(chk_list) == len(set(chk_list)):
        binary_list.append(binary)
print(max(binary_list))
0