結果

問題 No.1005 BOT対策
ユーザー forest3
提出日時 2020-03-24 12:10:30
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 300 bytes
コンパイル時間 1,851 ms
コンパイル使用メモリ 167,520 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-31 14:37:31
合計ジャッジ時間 2,930 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;


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

	int ans = 0;
	string::size_type pos = 0;
	while( true  ) {
		pos = S.find( T, pos );
		if( pos == string::npos ) break;
		pos += T.size();
		ans++;
	}
	if( T.size() == 1 ) ans = -1;

	cout << ans << endl;
}
0