結果

問題 No.430 文字列検索
ユーザー torikuminotorikumino
提出日時 2019-03-30 15:39:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 292 ms / 2,000 ms
コード長 201 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 50,480 KB
最終ジャッジ日時 2024-04-27 14:24:45
合計ジャッジ時間 4,107 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,496 KB
testcase_01 AC 292 ms
50,480 KB
testcase_02 AC 249 ms
11,008 KB
testcase_03 AC 249 ms
10,880 KB
testcase_04 AC 27 ms
10,496 KB
testcase_05 AC 28 ms
10,496 KB
testcase_06 AC 27 ms
10,624 KB
testcase_07 AC 30 ms
10,624 KB
testcase_08 AC 274 ms
50,476 KB
testcase_09 AC 29 ms
10,624 KB
testcase_10 AC 49 ms
13,952 KB
testcase_11 AC 259 ms
19,896 KB
testcase_12 AC 254 ms
20,104 KB
testcase_13 AC 259 ms
20,040 KB
testcase_14 AC 245 ms
16,512 KB
testcase_15 AC 237 ms
14,208 KB
testcase_16 AC 243 ms
10,880 KB
testcase_17 AC 254 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
s = input()
m = int(input())
a = [Counter(s[j:j+i+1] for j in range(0, len(s)-i)) for i in range(11)]
r = 0
for _ in range(m):
    c = input()
    r += a[len(c)-1][c]
print(r)
0