結果
問題 |
No.2715 Unique Chimatagram
|
ユーザー |
![]() |
提出日時 | 2024-04-05 21:30:38 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 578 bytes |
コンパイル時間 | 280 ms |
コンパイル使用メモリ | 82,212 KB |
実行使用メモリ | 63,744 KB |
最終ジャッジ日時 | 2024-10-01 01:44:14 |
合計ジャッジ時間 | 4,541 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 34 WA * 6 |
ソースコード
N = int(input()) dic = {} for i in range(N): S = list(input()) S.sort() nex = "".join(S) if nex in dic: dic[nex] += 1 else: dic[nex] = 1 #print(dic) abc = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] for ind,val in dic.items(): if val == 1: nex2 = list(ind) for j in abc: nex3 = nex2 + [j] nex3.sort() nex4 = "".join(nex3) if nex4 not in dic: print(nex4) exit() print(-1)