結果

問題 No.2715 Unique Chimatagram
ユーザー akasia_midoriakasia_midori
提出日時 2024-04-05 21:49:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 889 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 76,128 KB
最終ジャッジ日時 2024-04-05 21:49:40
合計ジャッジ時間 4,830 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
55,608 KB
testcase_01 AC 41 ms
55,608 KB
testcase_02 AC 41 ms
55,608 KB
testcase_03 WA -
testcase_04 AC 43 ms
55,608 KB
testcase_05 AC 41 ms
55,608 KB
testcase_06 AC 41 ms
55,608 KB
testcase_07 AC 41 ms
55,608 KB
testcase_08 AC 55 ms
65,268 KB
testcase_09 AC 61 ms
65,268 KB
testcase_10 AC 55 ms
65,268 KB
testcase_11 AC 57 ms
65,268 KB
testcase_12 AC 56 ms
65,268 KB
testcase_13 AC 58 ms
65,268 KB
testcase_14 AC 56 ms
65,268 KB
testcase_15 WA -
testcase_16 AC 62 ms
65,268 KB
testcase_17 AC 61 ms
65,268 KB
testcase_18 AC 62 ms
65,268 KB
testcase_19 AC 58 ms
65,268 KB
testcase_20 AC 57 ms
65,268 KB
testcase_21 AC 58 ms
65,268 KB
testcase_22 AC 61 ms
65,268 KB
testcase_23 AC 56 ms
65,268 KB
testcase_24 AC 57 ms
65,268 KB
testcase_25 AC 57 ms
65,268 KB
testcase_26 AC 57 ms
65,268 KB
testcase_27 AC 57 ms
65,268 KB
testcase_28 AC 66 ms
70,732 KB
testcase_29 AC 70 ms
72,808 KB
testcase_30 AC 71 ms
72,816 KB
testcase_31 AC 62 ms
68,632 KB
testcase_32 AC 72 ms
72,816 KB
testcase_33 AC 41 ms
55,608 KB
testcase_34 AC 41 ms
55,608 KB
testcase_35 AC 41 ms
55,608 KB
testcase_36 AC 41 ms
55,608 KB
testcase_37 AC 43 ms
55,608 KB
testcase_38 WA -
testcase_39 AC 78 ms
76,128 KB
testcase_40 AC 62 ms
70,624 KB
testcase_41 AC 88 ms
76,124 KB
testcase_42 AC 56 ms
65,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def oi(): return int(input())
def os(): return input().rstrip()
def mi(): return list(map(int, input().split()))

# import sys
# input = sys.stdin.readline
# import sys
# sys.setrecursionlimit(10**8)
# import pypyjit
# pypyjit.set_param('max_unroll_recursion=-1')
from collections import defaultdict
input_count = 0

N = oi()
dicts = defaultdict(int)
out = []
for _ in range(N):
    S = "".join(sorted(list(os())))
    dicts[S] += 1
alpha = [chr(ord("a")+i) for i in range(26)]
output = "-1"
flg = False
for o in dicts.keys():
    for a in alpha:
        temp = "".join(sorted(list(o+a)))
        count = 0
        for i in range(len(temp)):
            temp2 = temp[:i-1] + temp[i:]
            if temp2 in dicts:
                count += dicts[temp2]
        
        if count == 1:
            output = temp
            flg=True
            break
    if flg:
        break
print(output)
0