結果

問題 No.203 ゴールデン・ウィーク(1)
コンテスト
ユーザー 184
提出日時 2015-05-08 22:30:12
言語 C++11
(gcc 15.3.0 + boost 1.92.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 1,000 ms
+ 528µs
コード長 390 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 93 ms
コンパイル使用メモリ 41,104 KB
実行使用メモリ 9,852 KB
最終ジャッジ日時 2026-09-25 18:08:30
合計ジャッジ時間 1,485 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <cstdio>
#include <cstring>
#include <cstdlib>


using namespace std;

int main(){
	char s1[1000],s2[1000];scanf("%s%s",s1,s2);
	strcat(s1,s2);
	int ans=0,len=strlen(s1);
	for(int i=0;i<len;i++){
		if(s1[i]=='o'){
			int cnt=1;
			for(int j=i+1;j<len;j++){
				if(s1[j]!='o')break;
				cnt++;
			}
			i+=cnt-1;
			if(ans<cnt)ans=cnt;
		}
	} 
	printf("%d\n",ans);
	
	
	
	return 0;
}
0