結果

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

ソースコード

diff #

#include <algorithm>
#include <iostream>

using namespace std;

int main(int argc, const char* argv[])
{
	string s1, s2;
	cin >> s1 >> s2;
	string s   = s1 + s2;
	int maxCnt = 0;
	int cnt	= 0;
	for (auto&& c : s) {
		if (c == 'o') {
			cnt++;
		}
		else {
			maxCnt = max(maxCnt, cnt);
			cnt	= 0;
		}
	}
	maxCnt = max(maxCnt, cnt);
	cout << maxCnt << endl;
	return 0;
}
0