結果

問題 No.203 ゴールデン・ウィーク(1)
コンテスト
ユーザー startcpp
提出日時 2015-05-08 23:26:11
言語 C++11(gcc12)
(gcc 12.4.0 + boost 1.89.0)
コンパイル:
g++-12 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 563 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 938 ms
コンパイル使用メモリ 91,156 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-03-08 18:37:42
合計ジャッジ時間 2,064 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<map>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
using namespace std;

char buf[8], str[15];
int main() {
	cin >> buf;
	strcpy(str, buf);
	cin >> buf;
	strcat(str, buf);

	for(int i = 14; i > 0; i--) {
		char maru[15];
		for(int j = 0; j < i; j++) maru[j] = 'o';
		maru[i] = '\0';
		if(strstr(str, maru) != NULL) {
			cout << i << endl;
			return 0;
		}
	}
	cout << 0 << endl;
	return 0;
}
0