結果

問題 No.1005 BOT対策
ユーザー mmn15277198mmn15277198
提出日時 2020-03-25 22:39:52
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 495 bytes
コンパイル時間 590 ms
コンパイル使用メモリ 73,048 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-30 11:50:14
合計ジャッジ時間 1,890 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 WA -
testcase_05 AC 2 ms
4,380 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 WA -
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 2 ms
4,376 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 2 ms
4,380 KB
testcase_25 AC 1 ms
4,376 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <math.h>

using namespace std;


int main(){
	string s,t;
	cin >> s >> t;
	
	int f=0;
	for(int i=0;i<s.size();i++){
		if(t[0]==s[i]){
			//cout << "check_1 -> " << i << endl;
			f++;
			for(int j=1;j<t.size();j++){
				i++;
				if(t[j]!=s[i]){
					f--;
					break;
				}
			}
		}
	}
	
	/*
	if(s.size()/t.size()==f && s.size()%t.size()==0){
		cout << "-1" << endl;
		return 0;
	}
	*/
	
	cout << f << endl;
}

0