結果
| 問題 | 
                            No.1005 BOT対策
                             | 
                    
| コンテスト | |
| ユーザー | 
                             kpinkcat
                         | 
                    
| 提出日時 | 2023-08-24 17:36:19 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 451 bytes | 
| コンパイル時間 | 939 ms | 
| コンパイル使用メモリ | 100,464 KB | 
| 最終ジャッジ日時 | 2025-02-16 13:05:53 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 20 WA * 8 | 
ソースコード
#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
#include <iomanip>
#include<set>
#include <numeric>
using namespace std;
int main()
{
    string s, t;
    cin >> s >> t;
    int ls = s.size(), lt = t.size(), cnt = 0;
    for (int i = 0; i < ls - lt + 1; i++){
        string temp = s.substr(i, lt);
        if (temp == t){
            cnt++;
            i += lt -1;
        }
    }
    cout << cnt << endl;
}
            
            
            
        
            
kpinkcat