結果

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

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdlib>
#include <cstdio>
#define N 1000
#define re(i,n) for(int i=0;i<(n);i++)
using namespace std;

typedef long long ll;
int main(void){
	string a,b;
	int k=0,l=0;
	cin>>a>>b;

	re(i,a.size()){
		k=((a[i]=='o')?k+1:0);
		l=max(k,l);
	}
	re(i,b.size()){
		k=((b[i]=='o')?k+1:0);
		l=max(k,l);
	}

	cout<<l<<endl;
	return 0;
}
0