結果
| 問題 | No.430 文字列検索 |
| コンテスト | |
| ユーザー |
ふーらくたる
|
| 提出日時 | 2016-10-02 23:49:37 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 506 bytes |
| 記録 | |
| コンパイル時間 | 580 ms |
| コンパイル使用メモリ | 77,880 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-05-09 08:31:43 |
| 合計ジャッジ時間 | 12,818 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 TLE * 1 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
using ll = long long;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string s;
cin >> s;
int m;
cin >> m;
ll ans = 0;
for (int i = 0; i < m; i++) {
string c;
cin >> c;
int pos = 0;
auto res = s.find(c, pos);
while (res != -1) {
ans++;
res = s.find(c, res + 1);
}
}
cout << ans << endl;
return 0;
}
ふーらくたる