結果

問題 No.1994 Confusing Name
ユーザー ShirotsumeShirotsume
提出日時 2022-07-01 22:12:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,389 ms / 2,000 ms
コード長 487 bytes
コンパイル時間 301 ms
コンパイル使用メモリ 86,852 KB
実行使用メモリ 90,216 KB
最終ジャッジ日時 2023-08-17 09:43:09
合計ジャッジ時間 21,579 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 147 ms
81,824 KB
testcase_01 AC 149 ms
81,000 KB
testcase_02 AC 146 ms
81,164 KB
testcase_03 AC 142 ms
80,024 KB
testcase_04 AC 142 ms
80,204 KB
testcase_05 AC 167 ms
82,352 KB
testcase_06 AC 177 ms
82,476 KB
testcase_07 AC 160 ms
81,968 KB
testcase_08 AC 172 ms
82,408 KB
testcase_09 AC 178 ms
82,396 KB
testcase_10 AC 173 ms
82,488 KB
testcase_11 AC 170 ms
82,492 KB
testcase_12 AC 1,013 ms
89,472 KB
testcase_13 AC 1,389 ms
89,792 KB
testcase_14 AC 1,278 ms
89,544 KB
testcase_15 AC 1,165 ms
87,712 KB
testcase_16 AC 998 ms
87,084 KB
testcase_17 AC 1,119 ms
87,916 KB
testcase_18 AC 1,245 ms
89,840 KB
testcase_19 AC 1,234 ms
90,216 KB
testcase_20 AC 1,329 ms
90,196 KB
testcase_21 AC 353 ms
84,032 KB
testcase_22 AC 262 ms
83,208 KB
testcase_23 AC 1,107 ms
89,756 KB
testcase_24 AC 1,093 ms
89,660 KB
testcase_25 AC 793 ms
87,024 KB
testcase_26 AC 450 ms
84,256 KB
testcase_27 AC 1,028 ms
88,680 KB
testcase_28 AC 844 ms
86,936 KB
testcase_29 AC 242 ms
82,676 KB
testcase_30 AC 944 ms
87,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
INF = 2 ** 63 - 1
mod = 998244353

import string

S = string.ascii_lowercase

n = ii()

s = [input() for _ in range(n)]

se = set(s)

for v in s:
    ans = set()
    for i in range(len(v)):
        for u in S:
            to = v[:i] + u + v[i + 1:]
            if to in se:
                ans.add(to)
    ans.discard(v)
    print(len(ans))
0