結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー mlihua09mlihua09
提出日時 2020-09-16 18:19:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 437 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 86,124 KB
実行使用メモリ 75,288 KB
最終ジャッジ日時 2023-09-04 03:45:02
合計ジャッジ時間 6,794 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 79 ms
75,072 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 80 ms
70,636 KB
testcase_05 AC 76 ms
70,972 KB
testcase_06 AC 77 ms
70,664 KB
testcase_07 AC 79 ms
74,600 KB
testcase_08 AC 76 ms
70,548 KB
testcase_09 AC 76 ms
70,684 KB
testcase_10 AC 78 ms
75,276 KB
testcase_11 WA -
testcase_12 AC 75 ms
70,600 KB
testcase_13 AC 79 ms
75,020 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 76 ms
70,924 KB
testcase_17 AC 76 ms
70,704 KB
testcase_18 AC 78 ms
70,852 KB
testcase_19 AC 81 ms
70,792 KB
testcase_20 AC 81 ms
70,832 KB
testcase_21 AC 78 ms
70,684 KB
testcase_22 AC 82 ms
74,816 KB
testcase_23 AC 81 ms
70,680 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 79 ms
70,596 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 77 ms
70,856 KB
testcase_30 AC 80 ms
70,704 KB
testcase_31 AC 79 ms
70,552 KB
testcase_32 AC 78 ms
70,732 KB
testcase_33 AC 80 ms
75,236 KB
testcase_34 AC 80 ms
70,876 KB
testcase_35 AC 77 ms
70,788 KB
testcase_36 AC 78 ms
70,780 KB
testcase_37 AC 76 ms
70,660 KB
testcase_38 AC 76 ms
70,792 KB
testcase_39 AC 75 ms
70,748 KB
testcase_40 AC 77 ms
70,612 KB
testcase_41 AC 77 ms
70,684 KB
testcase_42 AC 80 ms
74,716 KB
testcase_43 AC 77 ms
70,592 KB
testcase_44 AC 80 ms
70,640 KB
testcase_45 AC 78 ms
70,604 KB
testcase_46 AC 75 ms
70,764 KB
testcase_47 WA -
testcase_48 AC 77 ms
70,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


D = int(input())

X = [0] * D + [0 if i == 'x' else 1 for i in input()] + [0 if i == 'x' else 1 for i in input()] + [0] * (D + 1)

ans = 0

for i in range(0, len(X) - D - 1):
    
    x = X.copy()
    for j in range(i, i + D):
        x[j] = 1
        
    a = 0
    b = 0
    for j in x:
        if j == 1:
            b += 1
        else:
            a = max(a, b)
            b = 0
            
    ans = max(ans, a)
    
print(ans)
0