結果

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

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;

int main()
{
	int ans = 0, cnt = 0;
	char c = 0;
	string w1, w2;

	cin >> w1 >> w2;
	w1 += w2;

	for (int i = 0; i < w1.size(); i++) {
		if (w1[i] == 'x') continue;
		cnt = 0;
		while (i < w1.size() && w1[i] == 'o') 
			cnt++, i++;
		if (ans < cnt) ans = cnt;
	}

	cout << ans << endl;
	return 0;
}
0