結果
| 問題 |
No.1005 BOT対策
|
| コンテスト | |
| ユーザー |
chacoder1
|
| 提出日時 | 2021-02-21 15:12:44 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 336 bytes |
| コンパイル時間 | 2,855 ms |
| コンパイル使用メモリ | 192,848 KB |
| 最終ジャッジ日時 | 2025-01-19 03:00:15 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long ll;
int main() {
string s,t;
cin>>s;
cin>>t;
int slen=s.size();
int tlen=t.size();
int cnt=0;
rep(i,slen-tlen+1){
if(s.substr(i,tlen)==t){
cnt++;
i+=tlen-1;
}
}
cout<<cnt<<endl;
return 0;
}
chacoder1