結果
問題 | No.2715 Unique Chimatagram |
ユーザー |
![]() |
提出日時 | 2024-04-05 21:36:32 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 84 ms / 2,000 ms |
コード長 | 343 bytes |
コンパイル時間 | 340 ms |
コンパイル使用メモリ | 82,780 KB |
実行使用メモリ | 81,688 KB |
最終ジャッジ日時 | 2024-10-01 01:50:22 |
合計ジャッジ時間 | 4,779 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 40 |
ソースコード
N = int(input())S = [''.join(sorted(input())) for _ in range(N)]d = {}for s in S:for c in range(97, 97+26):t = s + chr(c)t = ''.join(sorted(t))if not t in d:d[t] = []else:d[t].append(s)for k, v in d.items():if len(v) == 0:print(k)exit()print(-1)