結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー tkzw_21
提出日時 2015-05-08 23:08:48
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 320 bytes
コンパイル時間 1,373 ms
コンパイル使用メモリ 159,816 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-13 11:47:21
合計ジャッジ時間 2,406 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(void){
	string s1,s2;
	int d;
	cin >> d;
	cin >> s1 >> s2;
	s1 += s2;

	int ret = 0;
	for(int i=0;i<14;i++){
		int a=0;
		for(int j=0;j<14;j++){
			if(s1[j] == 'o' || (i<=j && j <i+d))a++;
			else a=0;
			ret = max(a,ret);
		}
	}
	cout << ret << endl;
	return 0;
}
0