結果

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

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>

using namespace std;

int main() {
	string in1, in2;

	cin >> in1 >> in2;
	string gw = in1 + in2;

	int holidays = 0;
	int max_holidays = 0;
	for (int i = 0; i < gw.size(); i++) {
		if (gw[i] == 'o') {
			holidays++;
		} else {
			max_holidays = max(max_holidays, holidays);
			holidays = 0;
		}
	}
	max_holidays = max(max_holidays, holidays);
	cout << max_holidays << endl;
	return 0;
}
0