結果

問題 No.2715 Unique Chimatagram
ユーザー dp_ijkdp_ijk
提出日時 2024-04-05 21:38:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 442 bytes
コンパイル時間 188 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 76,768 KB
最終ジャッジ日時 2024-04-05 21:38:36
合計ジャッジ時間 4,916 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,460 KB
testcase_01 AC 34 ms
53,460 KB
testcase_02 AC 33 ms
55,608 KB
testcase_03 AC 33 ms
55,608 KB
testcase_04 AC 34 ms
55,608 KB
testcase_05 AC 34 ms
55,608 KB
testcase_06 AC 34 ms
55,608 KB
testcase_07 AC 40 ms
55,608 KB
testcase_08 AC 68 ms
73,448 KB
testcase_09 AC 69 ms
72,924 KB
testcase_10 AC 74 ms
76,768 KB
testcase_11 AC 77 ms
76,760 KB
testcase_12 AC 63 ms
73,184 KB
testcase_13 AC 68 ms
76,640 KB
testcase_14 AC 60 ms
72,800 KB
testcase_15 AC 71 ms
76,768 KB
testcase_16 AC 69 ms
76,640 KB
testcase_17 AC 70 ms
76,648 KB
testcase_18 AC 60 ms
73,580 KB
testcase_19 AC 70 ms
73,580 KB
testcase_20 AC 61 ms
73,840 KB
testcase_21 AC 62 ms
73,580 KB
testcase_22 AC 59 ms
73,580 KB
testcase_23 AC 60 ms
73,580 KB
testcase_24 AC 61 ms
73,580 KB
testcase_25 AC 63 ms
74,732 KB
testcase_26 AC 62 ms
73,580 KB
testcase_27 AC 61 ms
73,452 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 37 ms
53,460 KB
testcase_34 AC 35 ms
53,460 KB
testcase_35 AC 35 ms
53,460 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 48 ms
64,204 KB
testcase_40 WA -
testcase_41 AC 62 ms
72,796 KB
testcase_42 AC 53 ms
68,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = []
for _ in range(N):
   s = input()
   s = "".join(sorted(s))
   S.append(s)

from collections import Counter

C = Counter()
for s in S:
   for i in range(len(s)):
      u = s[:i] + s[i+1:]
      C[u] += 1

for u, cnt in C.items():
   if cnt == 1:
      break
else:
   print(-1)
   exit()

target = u

for s in S:
   for i in range(len(s)):
      u = s[:i] + s[i+1:]
      if u == target:
         break

print(s + "x")
0