結果

問題 No.698 ペアでチームを作ろう
ユーザー jiromarujiromaru
提出日時 2018-06-19 19:47:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 499 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 10,652 KB
実行使用メモリ 118,024 KB
最終ジャッジ日時 2023-09-13 07:11:33
合計ジャッジ時間 2,610 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,580 KB
testcase_01 AC 15 ms
8,104 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
権限があれば一括ダウンロードができます

ソースコード

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