結果
問題 |
No.1005 BOT対策
|
ユーザー |
![]() |
提出日時 | 2020-03-07 00:51:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 420 bytes |
コンパイル時間 | 1,643 ms |
コンパイル使用メモリ | 167,176 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-14 10:56:23 |
合計ジャッジ時間 | 2,600 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 8 |
ソースコード
#define _LIBCPP_DEBUG 0 #include<bits/stdc++.h> using namespace std; typedef long long int ll; ll MOD = 1e9 + 7; int main(void) { string S,T; cin>>S>>T; int S_size = S.size(); int T_size = T.size(); int cnt = 0; for (int i = 0; i < S_size-T_size+1; ++i) { if(S.substr(i,T_size)==T) { cnt++; S[i+T_size-1]='.'; } } cout<<cnt<<endl; return 0; }