結果
問題 |
No.430 文字列検索
|
ユーザー |
|
提出日時 | 2016-10-07 08:54:20 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 131 ms / 2,000 ms |
コード長 | 232 bytes |
コンパイル時間 | 442 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,912 KB |
最終ジャッジ日時 | 2024-11-10 00:09:52 |
合計ジャッジ時間 | 2,234 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 14 |
ソースコード
#yuki_430 s=raw_input() n=int(raw_input()) d={} mxl=0 for i in xrange(n): c=raw_input() d[c]=1 mxl=max(len(c),mxl) res=0 for i in xrange(len(s)): for j in xrange(1,min(len(s)-i,mxl)+1): if s[i:i+j] in d: res+=1 print res