結果
| 問題 | No.2715 Unique Chimatagram | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2024-04-10 00:02:05 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 474 bytes | 
| コンパイル時間 | 671 ms | 
| コンパイル使用メモリ | 82,304 KB | 
| 実行使用メモリ | 77,440 KB | 
| 最終ジャッジ日時 | 2024-10-02 01:00:53 | 
| 合計ジャッジ時間 | 5,871 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 36 WA * 4 | 
ソースコード
N = int(input())
S = []
for i in range(N):
    s = input()
    t = list(s)
    t.sort()
    s = ''.join(t)
    S.append(s)
S.sort()
T = []
for i in range(N):
    if S.count(S[i]) == 1:
        T.append(S[i])
# print(T)
U = []
for t in T:
    for i in range(26):
        c = chr(ord("a")+i)
        u = list(t)
        u.append(c)
        u.sort()
        u = ''.join(u)
        U.append(u)
# print(U)
for u in U:
    if u not in S:
        print(u)
        exit()
print(-1)
            
            
            
        