結果
| 問題 | No.430 文字列検索 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-30 12:26:08 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 78 ms / 2,000 ms |
| + 847µs | |
| コード長 | 258 bytes |
| 記録 | |
| コンパイル時間 | 86 ms |
| コンパイル使用メモリ | 64,768 KB |
| 実行使用メモリ | 60,580 KB |
| 最終ジャッジ日時 | 2026-10-15 20:29:22 |
| 合計ジャッジ時間 | 3,020 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 18 |
ソースコード
import collections
S = input()
N = len(S)
M = int(input())
lsC = [input() for i in range(M)]
cnt = collections.Counter(lsC)
ans = 0
for i in range(N):
for j in range(1,11):
if N < i+j:
continue
ans += cnt[S[i:i+j]]
print(ans)