結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー koyumeishi
提出日時 2015-05-08 23:24:22
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 487 bytes
コンパイル時間 739 ms
コンパイル使用メモリ 73,924 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-18 09:05:35
合計ジャッジ時間 1,688 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <cstdio>
#include <sstream>
#include <map>
#include <string>
#include <algorithm>
#include <queue>
#include <cmath>
#include <set>
using namespace std;

int main(){
	string a,b;
	cin >> a >> b;
	a += b;

	int ans = 0;
	int last = -100;
	int tmp = 0;
	for(int i=0; i<a.size(); i++){
		if(a[i] == 'o'){
			if(last == i-1){
				tmp++;
			}else{
				tmp = 1;
			}
			ans = max(ans, tmp);
			last = i;
		}
	}

	cout << ans << endl;

	return 0;
}
0