結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
70,628 KB
testcase_01 AC 80 ms
75,332 KB
testcase_02 AC 77 ms
70,652 KB
testcase_03 AC 78 ms
70,916 KB
testcase_04 AC 78 ms
70,676 KB
testcase_05 AC 80 ms
70,656 KB
testcase_06 AC 79 ms
70,696 KB
testcase_07 AC 83 ms
75,196 KB
testcase_08 AC 81 ms
75,276 KB
testcase_09 AC 82 ms
74,980 KB
testcase_10 AC 82 ms
75,148 KB
testcase_11 AC 78 ms
70,828 KB
testcase_12 AC 77 ms
70,604 KB
testcase_13 AC 83 ms
75,352 KB
testcase_14 AC 76 ms
70,560 KB
testcase_15 AC 81 ms
74,984 KB
testcase_16 AC 79 ms
70,676 KB
testcase_17 AC 77 ms
70,852 KB
testcase_18 AC 80 ms
75,280 KB
testcase_19 AC 85 ms
75,064 KB
testcase_20 AC 81 ms
75,280 KB
testcase_21 AC 83 ms
74,856 KB
testcase_22 AC 85 ms
75,008 KB
testcase_23 AC 77 ms
70,636 KB
testcase_24 AC 77 ms
70,528 KB
testcase_25 AC 79 ms
70,852 KB
testcase_26 AC 77 ms
70,776 KB
testcase_27 AC 77 ms
70,752 KB
testcase_28 AC 81 ms
74,908 KB
testcase_29 AC 77 ms
70,856 KB
testcase_30 AC 78 ms
70,832 KB
testcase_31 AC 78 ms
70,516 KB
testcase_32 AC 77 ms
70,852 KB
testcase_33 AC 81 ms
75,088 KB
testcase_34 AC 77 ms
70,636 KB
testcase_35 AC 78 ms
70,860 KB
testcase_36 AC 75 ms
70,608 KB
testcase_37 AC 75 ms
70,552 KB
testcase_38 AC 81 ms
70,608 KB
testcase_39 AC 78 ms
70,776 KB
testcase_40 AC 78 ms
70,756 KB
testcase_41 AC 79 ms
70,600 KB
testcase_42 AC 83 ms
75,272 KB
testcase_43 AC 78 ms
70,684 KB
testcase_44 AC 79 ms
70,600 KB
testcase_45 AC 78 ms
70,752 KB
testcase_46 AC 78 ms
70,520 KB
testcase_47 AC 86 ms
75,068 KB
testcase_48 AC 82 ms
70,628 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) - 1):
    
    x = X.copy()
    for j in range(i, min(len(x) - 1, i + D)):
        if x[j] == 0:
            x[j] = 1
        else:
            break
        
    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