結果
| 問題 | No.1005 BOT対策 |
| コンテスト | |
| ユーザー |
kpinkcat
|
| 提出日時 | 2023-08-24 17:36:19 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 451 bytes |
| 記録 | |
| コンパイル時間 | 643 ms |
| コンパイル使用メモリ | 116,880 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-07-02 06:45:37 |
| 合計ジャッジ時間 | 2,132 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 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