結果

問題 No.2715 Unique Chimatagram
ユーザー akasia_midoriakasia_midori
提出日時 2024-04-06 03:13:50
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 985 bytes
コンパイル時間 241 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 76,360 KB
最終ジャッジ日時 2024-04-06 03:14:08
合計ジャッジ時間 5,205 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
55,612 KB
testcase_01 AC 40 ms
55,612 KB
testcase_02 AC 40 ms
55,612 KB
testcase_03 AC 41 ms
55,612 KB
testcase_04 AC 40 ms
55,612 KB
testcase_05 AC 40 ms
55,612 KB
testcase_06 AC 39 ms
55,612 KB
testcase_07 AC 40 ms
55,612 KB
testcase_08 AC 63 ms
68,636 KB
testcase_09 AC 68 ms
70,728 KB
testcase_10 AC 72 ms
72,792 KB
testcase_11 AC 71 ms
72,792 KB
testcase_12 AC 77 ms
72,796 KB
testcase_13 AC 73 ms
72,792 KB
testcase_14 AC 65 ms
68,640 KB
testcase_15 AC 71 ms
72,792 KB
testcase_16 AC 64 ms
68,636 KB
testcase_17 AC 65 ms
68,604 KB
testcase_18 AC 82 ms
76,232 KB
testcase_19 AC 83 ms
76,236 KB
testcase_20 AC 84 ms
76,240 KB
testcase_21 AC 85 ms
76,236 KB
testcase_22 AC 84 ms
76,240 KB
testcase_23 AC 84 ms
76,240 KB
testcase_24 AC 83 ms
76,108 KB
testcase_25 AC 84 ms
76,232 KB
testcase_26 AC 83 ms
76,104 KB
testcase_27 AC 84 ms
76,248 KB
testcase_28 AC 67 ms
70,720 KB
testcase_29 AC 67 ms
70,724 KB
testcase_30 AC 71 ms
72,800 KB
testcase_31 AC 65 ms
70,720 KB
testcase_32 AC 65 ms
70,720 KB
testcase_33 AC 40 ms
55,612 KB
testcase_34 AC 40 ms
55,612 KB
testcase_35 AC 40 ms
55,612 KB
testcase_36 AC 40 ms
55,612 KB
testcase_37 AC 41 ms
55,612 KB
testcase_38 WA -
testcase_39 AC 79 ms
76,148 KB
testcase_40 WA -
testcase_41 AC 107 ms
76,360 KB
testcase_42 AC 58 ms
65,272 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 = {i:defaultdict(int) for i in range(1,12)}
for _ in range(N):
    S = "".join(sorted(list(os())))
    dicts[len(S)][S] += 1
alpha = [chr(ord("a")+i) for i in range(26)]
output = "-1"
flg = False
for i in range(1, 11):
    for k in dicts[i].keys():
        for a in alpha:
            temp = "".join(sorted(list(k+a)))
            count = 0
            for j in range(len(temp)):
                temp2 = temp[:j] + temp[j+1:]
                if temp2 in dicts[i]:
                    count += dicts[i][temp2]
            if count == 1:
                output = k+a
                flg = True
                break
    if flg:
        break
print(output)
0