結果

問題 No.1005 BOT対策
ユーザー Homuhomu
提出日時 2020-04-20 04:14:56
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 371 bytes
コンパイル時間 639 ms
コンパイル使用メモリ 68,092 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-06 08:28:27
合計ジャッジ時間 1,682 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16 WA * 8 RE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <numeric>

using namespace std;
using ull = unsigned long long;

int main() 
{
	string S, T;
	cin >> S;
	cin >> T;

	int i = 0;
	size_t tl= T.length();

	int r = 0;
	while (i <= S.length() - tl)
	{
		if (S.substr(i, tl) == T)
		{
			i += tl;
			++r;
		}
		else
			++i;
	}

	cout << r << endl;

	return 0;
}
0