結果

問題 No.698 ペアでチームを作ろう
ユーザー jiromaru
提出日時 2018-06-19 19:47:42
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 499 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 123,172 KB
最終ジャッジ日時 2024-06-30 17:17:58
合計ジャッジ時間 2,568 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 TLE * 1
other -- * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

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