結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー ぴろずぴろず
提出日時 2015-05-08 22:25:56
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 698 bytes
コンパイル時間 1,888 ms
コンパイル使用メモリ 75,024 KB
実行使用メモリ 41,808 KB
最終ジャッジ日時 2024-04-21 12:54:37
合計ジャッジ時間 8,053 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
39,636 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 98 ms
40,104 KB
testcase_04 AC 95 ms
40,108 KB
testcase_05 AC 104 ms
41,548 KB
testcase_06 AC 105 ms
40,176 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 110 ms
41,152 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 100 ms
41,136 KB
testcase_26 AC 107 ms
41,252 KB
testcase_27 AC 98 ms
41,012 KB
testcase_28 WA -
testcase_29 AC 107 ms
41,000 KB
testcase_30 AC 113 ms
41,248 KB
testcase_31 AC 99 ms
40,112 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 95 ms
41,328 KB
testcase_35 AC 104 ms
40,060 KB
testcase_36 AC 102 ms
40,032 KB
testcase_37 AC 106 ms
41,068 KB
testcase_38 AC 110 ms
40,944 KB
testcase_39 WA -
testcase_40 AC 95 ms
39,856 KB
testcase_41 AC 109 ms
41,224 KB
testcase_42 WA -
testcase_43 AC 100 ms
40,148 KB
testcase_44 AC 106 ms
41,400 KB
testcase_45 AC 103 ms
39,932 KB
testcase_46 AC 105 ms
40,932 KB
testcase_47 WA -
testcase_48 AC 97 ms
41,188 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no204;

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int d = sc.nextInt();
		char[] c = new char[14];
		for(int i=0;i<2;i++) {
			char[] s = sc.next().toCharArray();
			for(int j=0;j<7;j++) {
				c[i*7+j] = s[j];
			}
		}
		int max = 0;
		for(int k=0;k<14;k++) {
			int now = 0;
			int yukyuu = 0;
			for(int i=0;i<14;i++) {
				if (i == k) {
					yukyuu = d;
				}
				if (c[i] == 'o') {
					now++;
					max = Math.max(max, now);
					yukyuu = 0;
				}else if(yukyuu > 0){
					now++;
					max = Math.max(max, now);
					yukyuu--;
				}else{
					now = 0;
				}
			}
		}
		System.out.println(max);
	}
}
0