結果

問題 No.2715 Unique Chimatagram
ユーザー ShirotsumeShirotsume
提出日時 2024-04-05 21:43:42
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 682 bytes
コンパイル時間 517 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 90,452 KB
最終ジャッジ日時 2024-04-05 21:44:11
合計ジャッジ時間 14,500 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
66,304 KB
testcase_01 AC 61 ms
66,304 KB
testcase_02 AC 60 ms
66,304 KB
testcase_03 AC 59 ms
66,304 KB
testcase_04 AC 62 ms
66,304 KB
testcase_05 AC 58 ms
66,304 KB
testcase_06 AC 59 ms
66,304 KB
testcase_07 AC 58 ms
66,304 KB
testcase_08 AC 145 ms
81,984 KB
testcase_09 AC 153 ms
82,364 KB
testcase_10 AC 163 ms
82,368 KB
testcase_11 AC 154 ms
82,496 KB
testcase_12 AC 149 ms
81,980 KB
testcase_13 AC 154 ms
82,496 KB
testcase_14 AC 148 ms
81,856 KB
testcase_15 AC 154 ms
82,108 KB
testcase_16 AC 148 ms
81,984 KB
testcase_17 AC 161 ms
82,108 KB
testcase_18 AC 163 ms
83,648 KB
testcase_19 AC 163 ms
83,648 KB
testcase_20 AC 165 ms
83,648 KB
testcase_21 AC 167 ms
83,648 KB
testcase_22 AC 165 ms
83,648 KB
testcase_23 AC 174 ms
83,648 KB
testcase_24 AC 156 ms
83,648 KB
testcase_25 AC 156 ms
83,648 KB
testcase_26 AC 157 ms
83,648 KB
testcase_27 AC 159 ms
83,648 KB
testcase_28 AC 175 ms
82,496 KB
testcase_29 AC 185 ms
82,496 KB
testcase_30 AC 198 ms
82,496 KB
testcase_31 AC 183 ms
82,496 KB
testcase_32 AC 172 ms
82,496 KB
testcase_33 AC 58 ms
66,304 KB
testcase_34 AC 57 ms
66,304 KB
testcase_35 AC 57 ms
66,304 KB
testcase_36 AC 58 ms
66,304 KB
testcase_37 AC 58 ms
66,304 KB
testcase_38 WA -
testcase_39 AC 972 ms
80,576 KB
testcase_40 WA -
testcase_41 TLE -
testcase_42 TLE -
権限があれば一括ダウンロードができます

ソースコード

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]))
ts.sort()
for v in ts:
    # v から1文字抜いたものがsに含まれているか
    cnt = 0
    for i in range(len(v)):
        cnt += s.count(sorted(v[:i] + v[i+1:]))
        if cnt > 1:
            break
    if cnt == 1:
        print(''.join(v))
        exit()
print(-1)
0