結果
問題 | No.2715 Unique Chimatagram |
ユーザー | june19312 |
提出日時 | 2024-04-05 21:43:15 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 90 ms / 2,000 ms |
コード長 | 815 bytes |
コンパイル時間 | 373 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 81,440 KB |
最終ジャッジ日時 | 2024-10-01 01:57:37 |
合計ジャッジ時間 | 4,868 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 36 ms
52,096 KB |
testcase_01 | AC | 36 ms
52,480 KB |
testcase_02 | AC | 37 ms
52,352 KB |
testcase_03 | AC | 39 ms
52,736 KB |
testcase_04 | AC | 38 ms
52,864 KB |
testcase_05 | AC | 37 ms
52,224 KB |
testcase_06 | AC | 38 ms
52,480 KB |
testcase_07 | AC | 36 ms
52,096 KB |
testcase_08 | AC | 82 ms
79,744 KB |
testcase_09 | AC | 83 ms
80,096 KB |
testcase_10 | AC | 83 ms
79,664 KB |
testcase_11 | AC | 83 ms
80,260 KB |
testcase_12 | AC | 82 ms
80,032 KB |
testcase_13 | AC | 84 ms
79,828 KB |
testcase_14 | AC | 83 ms
79,556 KB |
testcase_15 | AC | 84 ms
79,804 KB |
testcase_16 | AC | 83 ms
79,744 KB |
testcase_17 | AC | 85 ms
79,872 KB |
testcase_18 | AC | 87 ms
81,024 KB |
testcase_19 | AC | 90 ms
81,440 KB |
testcase_20 | AC | 87 ms
81,008 KB |
testcase_21 | AC | 86 ms
80,868 KB |
testcase_22 | AC | 84 ms
81,004 KB |
testcase_23 | AC | 85 ms
81,404 KB |
testcase_24 | AC | 86 ms
81,228 KB |
testcase_25 | AC | 86 ms
81,028 KB |
testcase_26 | AC | 85 ms
81,144 KB |
testcase_27 | AC | 86 ms
80,896 KB |
testcase_28 | AC | 79 ms
76,416 KB |
testcase_29 | AC | 78 ms
76,380 KB |
testcase_30 | AC | 78 ms
76,596 KB |
testcase_31 | AC | 80 ms
76,416 KB |
testcase_32 | AC | 78 ms
76,644 KB |
testcase_33 | AC | 37 ms
52,096 KB |
testcase_34 | AC | 37 ms
52,352 KB |
testcase_35 | AC | 38 ms
52,352 KB |
testcase_36 | AC | 36 ms
51,840 KB |
testcase_37 | AC | 35 ms
52,224 KB |
testcase_38 | AC | 58 ms
66,304 KB |
testcase_39 | AC | 75 ms
77,168 KB |
testcase_40 | AC | 75 ms
77,052 KB |
testcase_41 | AC | 83 ms
78,336 KB |
testcase_42 | AC | 80 ms
76,160 KB |
ソースコード
N = int(input()) dic = {} dic2 = {} 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 i in range(N): S = list(input()) S.sort() nex = "".join(S) if nex in dic: dic[nex] += 1 else: dic[nex] = 1 for j in abc: nex2 = S + [j] nex2.sort() nex3 = "".join(nex2) if nex3 not in dic2: dic2[nex3] = 1 else: dic2[nex3] += 1 #print(dic) #print(dic2) for ind,val in dic.items(): if val == 1: for j in abc: nex2 = list(ind) + [j] nex2.sort() nex3 = "".join(nex2) if nex3 in dic2 and dic2[nex3] == 1: print(nex3) exit() print(-1)