結果
| 問題 |
No.430 文字列検索
|
| ユーザー |
ヒッキープログラミングするスレ
|
| 提出日時 | 2016-10-03 00:39:20 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 246 bytes |
| コンパイル時間 | 609 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 11,264 KB |
| 最終ジャッジ日時 | 2024-11-10 00:07:26 |
| 合計ジャッジ時間 | 3,614 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 11 WA * 3 |
ソースコード
s = input()
m = int(input())
h = {}
mx = 0
for _ in range(m):
c = input()
h[c] = True
mx = max(len(c), mx)
ans = 0
for i in range(len(s)):
for j in range(1, mx + 1):
if s[i : i + j] in h:
ans += 1
print(ans)
ヒッキープログラミングするスレ