結果

問題 No.1005 BOT対策
ユーザー ngtkana
提出日時 2020-04-11 09:45:15
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 507 bytes
コンパイル時間 2,330 ms
コンパイル使用メモリ 193,560 KB
最終ジャッジ日時 2025-01-09 17:16:04
ジャッジサーバーID
(参考情報)
judge4 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define ALL(v) std::begin(v),std::end(v)
using lint=long long;
using ld=long double;
int main(){
    std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false);
    std::cout.setf(std::ios_base::fixed);std::cout.precision(15);
    std::string s,t;std::cin>>s>>t;
    lint l=s.length(),m=t.length();
    lint ans=0;
    for(lint i=0;i<l;){
        if(s.substr(i,m)==t){
            i+=m;
            ans++;
        }else{
            i++;
        }
    }
    std::cout<<ans<<'\n';
}
0