結果
| 問題 | No.1994 Confusing Name |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-01 22:33:08 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
TLE
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 419 bytes |
| 記録 | |
| コンパイル時間 | 1,009 ms |
| コンパイル使用メモリ | 64,560 KB |
| 実行使用メモリ | 73,052 KB |
| 最終ジャッジ日時 | 2026-10-16 12:13:38 |
| 合計ジャッジ時間 | 30,193 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 TLE * 2 |
ソースコード
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)