結果

問題 No.1005 BOT対策
ユーザー kibuna
提出日時 2020-03-06 21:33:08
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 471 bytes
コンパイル時間 1,455 ms
コンパイル使用メモリ 166,924 KB
実行使用メモリ 13,640 KB
最終ジャッジ日時 2024-10-14 10:24:19
合計ジャッジ時間 4,865 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 1 TLE * 1 -- * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using lint     = long long;
const lint inf = 1LL << 60;
const lint mod = 1000000007;

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    string s, t;
    cin >> s >> t;
    int ns = s.size(), nt = t.size();
    int ret = 0;
    for (int i = 0; i < ns - nt + 1; ++i) {
        if (s.substr(i, nt) == t) {
            ret++;
            i += nt - 2;
        }
    }
    cout << ret << "\n";
    return 0;
}
0