結果

問題 No.1994 Confusing Name
ユーザー titan23titan23
提出日時 2022-07-01 22:33:08
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 419 bytes
コンパイル時間 1,433 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 88,860 KB
最終ジャッジ日時 2023-08-17 10:02:52
合計ジャッジ時間 8,341 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
77,780 KB
testcase_01 AC 113 ms
77,212 KB
testcase_02 AC 105 ms
77,204 KB
testcase_03 AC 97 ms
71,632 KB
testcase_04 AC 102 ms
71,736 KB
testcase_05 AC 129 ms
77,828 KB
testcase_06 AC 143 ms
77,892 KB
testcase_07 AC 117 ms
77,800 KB
testcase_08 AC 134 ms
77,732 KB
testcase_09 AC 149 ms
78,200 KB
testcase_10 AC 131 ms
77,704 KB
testcase_11 AC 129 ms
77,852 KB
testcase_12 TLE -
testcase_13 TLE -
testcase_14 TLE -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 TLE -
testcase_21 AC 536 ms
80,892 KB
testcase_22 AC 306 ms
79,304 KB
testcase_23 TLE -
testcase_24 TLE -
testcase_25 AC 1,527 ms
84,464 KB
testcase_26 AC 754 ms
81,276 KB
testcase_27 TLE -
testcase_28 AC 1,695 ms
84,736 KB
testcase_29 AC 277 ms
78,788 KB
testcase_30 AC 1,774 ms
85,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import defaultdict
input = lambda: sys.stdin.readline().rstrip()

#  -----------------------  #

n = int(input())
S = [input() for _ in range(n)]

st = set(S)

alp = 'abcdefghijklmnopqrstuvwxyz'
for s in S:
  ans = 0
  
  for i in range(len(s)):
    for c in alp:
      if s[i] == c:
        continue
      t = list(s)
      t[i] = c
      if ''.join(t) in st:
        ans += 1
  print(ans)
0