結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー MayimgMayimg
提出日時 2019-01-19 07:59:04
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 501 bytes
コンパイル時間 1,579 ms
コンパイル使用メモリ 163,884 KB
実行使用メモリ 8,752 KB
最終ジャッジ日時 2023-09-22 16:35:49
合計ジャッジ時間 4,997 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
7,540 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 2 ms
4,376 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 2 ms
4,376 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 1 ms
4,376 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 2 ms
4,376 KB
testcase_35 TLE -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int d;
	cin >> d;
	string s;
	for (int i = 0; i < 2; i++) {
		string t;
		cin >> t;
		s += t;
	}
	int ans = 0;
	for (int i = 0; i <= 14 - d; i++) {
		int cnt = 0;
		for (int j = 0; j < 14; j++) {
			if(j == i) {
				cnt += d;
				j += d - 1;
				continue;
			}
			if(s[j] == 'o') cnt++;
			else cnt = 0;
			ans = max(ans, cnt);
		}
	}
	cout << ans << endl;
	return 0;
}
0