結果

問題 No.2715 Unique Chimatagram
ユーザー loop0919loop0919
提出日時 2024-04-05 22:47:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 200 ms / 2,000 ms
コード長 437 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 93,360 KB
最終ジャッジ日時 2024-04-05 22:47:21
合計ジャッジ時間 5,761 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
63,656 KB
testcase_01 AC 62 ms
66,292 KB
testcase_02 AC 56 ms
63,656 KB
testcase_03 AC 55 ms
63,656 KB
testcase_04 AC 56 ms
63,656 KB
testcase_05 AC 56 ms
63,656 KB
testcase_06 AC 57 ms
63,656 KB
testcase_07 AC 60 ms
63,656 KB
testcase_08 AC 99 ms
81,424 KB
testcase_09 AC 99 ms
81,536 KB
testcase_10 AC 99 ms
81,532 KB
testcase_11 AC 101 ms
82,172 KB
testcase_12 AC 102 ms
81,280 KB
testcase_13 AC 102 ms
81,532 KB
testcase_14 AC 97 ms
81,428 KB
testcase_15 AC 102 ms
81,408 KB
testcase_16 AC 99 ms
81,296 KB
testcase_17 AC 102 ms
81,408 KB
testcase_18 AC 107 ms
83,324 KB
testcase_19 AC 106 ms
83,324 KB
testcase_20 AC 114 ms
83,324 KB
testcase_21 AC 106 ms
83,324 KB
testcase_22 AC 106 ms
83,324 KB
testcase_23 AC 106 ms
83,324 KB
testcase_24 AC 107 ms
83,324 KB
testcase_25 AC 105 ms
83,324 KB
testcase_26 AC 105 ms
83,324 KB
testcase_27 AC 109 ms
83,324 KB
testcase_28 AC 100 ms
78,076 KB
testcase_29 AC 104 ms
78,076 KB
testcase_30 AC 100 ms
78,076 KB
testcase_31 AC 97 ms
78,076 KB
testcase_32 AC 99 ms
78,076 KB
testcase_33 AC 57 ms
63,656 KB
testcase_34 AC 58 ms
66,292 KB
testcase_35 AC 58 ms
66,300 KB
testcase_36 AC 56 ms
63,656 KB
testcase_37 AC 57 ms
63,656 KB
testcase_38 AC 63 ms
68,892 KB
testcase_39 AC 134 ms
78,368 KB
testcase_40 AC 86 ms
77,472 KB
testcase_41 AC 200 ms
93,360 KB
testcase_42 AC 141 ms
78,972 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict, Counter
from string import ascii_lowercase

N = int(input())
S = [''.join(sorted(input())) for _ in range(N)]

if N == 1:
    print(S[0] + 'z')
    exit()

words = []

for c in ascii_lowercase:
    for s in S:
        words.append(''.join(sorted(s + c)))

for c in ascii_lowercase:
    for key, val in Counter(words).items():
        if val == 1:
            print(key)
            exit()

print(-1)
0