結果
| 問題 | No.1005 BOT対策 |
| コンテスト | |
| ユーザー |
mmn15277198
|
| 提出日時 | 2020-07-05 17:25:30 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 472 bytes |
| 記録 | |
| コンパイル時間 | 431 ms |
| コンパイル使用メモリ | 97,132 KB |
| 実行使用メモリ | 7,728 KB |
| 最終ジャッジ日時 | 2026-09-02 13:35:47 |
| 合計ジャッジ時間 | 2,813 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 WA * 2 RE * 3 |
ソースコード
#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <math.h>
#include <map>
using namespace std;
int main(){
string s,t;
cin >> s >> t;
int cnt=0;
for(int i=0;i<=s.size()-t.size();i++){
if(s.substr(i,t.size())==t){
cnt++;
i+=t.size()-1;
}
}
if(cnt>0 && t.size()==1){
cout << -1 << endl;
return 0;
}
if(t.size()>s.size()){
cout << 0 << endl;
return 0;
}
cout << cnt << endl;
return 0;
}
mmn15277198