結果
問題 |
No.1005 BOT対策
|
ユーザー |
![]() |
提出日時 | 2020-05-07 20:52:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 346 bytes |
コンパイル時間 | 1,640 ms |
コンパイル使用メモリ | 166,960 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-03 09:34:07 |
合計ジャッジ時間 | 2,310 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 8 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int sl = S.size(), tl = T.size(); int c = 0; for (int i = 0; i < sl;) { if (S.at(i) == T.at(0)) { string x = S.substr(i, tl); if (x == T) { c++; i += tl; } else { i++; } } else { i++; } } cout << c << endl; }