結果

問題 No.2715 Unique Chimatagram
ユーザー ShirotsumeShirotsume
提出日時 2024-04-05 21:38:48
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 635 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 89,556 KB
最終ジャッジ日時 2024-04-05 21:39:05
合計ジャッジ時間 16,952 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
66,304 KB
testcase_01 AC 63 ms
66,304 KB
testcase_02 AC 58 ms
66,304 KB
testcase_03 AC 56 ms
66,304 KB
testcase_04 AC 57 ms
66,304 KB
testcase_05 AC 56 ms
66,304 KB
testcase_06 AC 58 ms
66,304 KB
testcase_07 AC 61 ms
66,304 KB
testcase_08 AC 82 ms
79,424 KB
testcase_09 AC 83 ms
79,804 KB
testcase_10 AC 82 ms
79,680 KB
testcase_11 AC 94 ms
79,680 KB
testcase_12 AC 92 ms
79,552 KB
testcase_13 AC 84 ms
79,680 KB
testcase_14 AC 83 ms
79,424 KB
testcase_15 AC 84 ms
79,548 KB
testcase_16 AC 82 ms
79,424 KB
testcase_17 AC 83 ms
79,548 KB
testcase_18 AC 85 ms
79,936 KB
testcase_19 AC 85 ms
79,936 KB
testcase_20 AC 85 ms
79,936 KB
testcase_21 AC 84 ms
79,936 KB
testcase_22 AC 98 ms
79,936 KB
testcase_23 AC 85 ms
79,936 KB
testcase_24 AC 85 ms
79,936 KB
testcase_25 AC 86 ms
79,936 KB
testcase_26 AC 85 ms
79,936 KB
testcase_27 AC 86 ms
79,936 KB
testcase_28 AC 715 ms
82,752 KB
testcase_29 AC 254 ms
82,880 KB
testcase_30 AC 472 ms
82,880 KB
testcase_31 AC 143 ms
82,752 KB
testcase_32 AC 1,694 ms
82,880 KB
testcase_33 AC 56 ms
66,304 KB
testcase_34 AC 57 ms
66,304 KB
testcase_35 AC 57 ms
66,304 KB
testcase_36 AC 57 ms
66,304 KB
testcase_37 AC 61 ms
66,304 KB
testcase_38 WA -
testcase_39 TLE -
testcase_40 TLE -
testcase_41 TLE -
testcase_42 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, time, random
from collections import deque, Counter, defaultdict
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 61 - 1
mod = 998244353
import string
n = ii()
s = [sorted(input()) for _ in range(n)]
ts = []
for v in s:
    for x in string.ascii_lowercase:
        ts.append(sorted(v + [x]))
        
for v in ts:
    # v から1文字抜いたものがsに含まれているか
    cnt = 0
    for i in range(len(v)):
        cnt += s.count(v[:i] + v[i+1:])
    if cnt == 1:
        print(''.join(v))
        exit()
print(-1)
0