結果
問題 |
No.1005 BOT対策
|
ユーザー |
|
提出日時 | 2020-04-20 04:14:35 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 370 bytes |
コンパイル時間 | 584 ms |
コンパイル使用メモリ | 69,136 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-06 08:28:21 |
合計ジャッジ時間 | 1,813 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 11 WA * 13 RE * 3 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <numeric> using namespace std; using ull = unsigned long long; int main() { string S, T; cin >> S; cin >> T; int i = 0; size_t tl= T.length(); int r = 0; while (i < S.length() - tl) { if (S.substr(i, tl) == T) { i += tl; ++r; } else ++i; } cout << r << endl; return 0; }