結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー gorugo30gorugo30
提出日時 2021-03-17 20:40:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 1,000 ms
コード長 565 bytes
コンパイル時間 201 ms
コンパイル使用メモリ 82,364 KB
実行使用メモリ 60,860 KB
最終ジャッジ日時 2024-04-27 13:11:01
合計ジャッジ時間 3,052 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,864 KB
testcase_01 AC 37 ms
59,368 KB
testcase_02 AC 34 ms
53,692 KB
testcase_03 AC 34 ms
53,204 KB
testcase_04 AC 34 ms
52,208 KB
testcase_05 AC 34 ms
52,884 KB
testcase_06 AC 33 ms
52,448 KB
testcase_07 AC 36 ms
60,256 KB
testcase_08 AC 33 ms
54,564 KB
testcase_09 AC 34 ms
52,484 KB
testcase_10 AC 37 ms
60,860 KB
testcase_11 AC 37 ms
53,416 KB
testcase_12 AC 33 ms
53,568 KB
testcase_13 AC 36 ms
59,352 KB
testcase_14 AC 33 ms
53,760 KB
testcase_15 AC 37 ms
59,936 KB
testcase_16 AC 34 ms
52,952 KB
testcase_17 AC 33 ms
53,324 KB
testcase_18 AC 35 ms
53,776 KB
testcase_19 AC 38 ms
53,640 KB
testcase_20 AC 35 ms
52,080 KB
testcase_21 AC 34 ms
52,820 KB
testcase_22 AC 39 ms
58,892 KB
testcase_23 AC 35 ms
53,412 KB
testcase_24 AC 34 ms
52,760 KB
testcase_25 AC 34 ms
53,724 KB
testcase_26 AC 34 ms
52,564 KB
testcase_27 AC 35 ms
52,756 KB
testcase_28 AC 38 ms
59,548 KB
testcase_29 AC 33 ms
52,460 KB
testcase_30 AC 33 ms
52,884 KB
testcase_31 AC 32 ms
53,288 KB
testcase_32 AC 35 ms
53,768 KB
testcase_33 AC 37 ms
59,216 KB
testcase_34 AC 34 ms
53,788 KB
testcase_35 AC 33 ms
53,152 KB
testcase_36 AC 34 ms
52,216 KB
testcase_37 AC 35 ms
54,288 KB
testcase_38 AC 34 ms
53,176 KB
testcase_39 AC 35 ms
53,036 KB
testcase_40 AC 34 ms
52,160 KB
testcase_41 AC 34 ms
52,608 KB
testcase_42 AC 37 ms
58,624 KB
testcase_43 AC 35 ms
53,164 KB
testcase_44 AC 33 ms
52,380 KB
testcase_45 AC 34 ms
53,880 KB
testcase_46 AC 34 ms
52,556 KB
testcase_47 AC 34 ms
53,224 KB
testcase_48 AC 35 ms
53,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

D = int(input())
C = ["x"] * D + list(input()) + list(input()) + ["x"] * D
ans = 0
for i in range(1, 15):
    if "o" * i in "".join(C):
        ans = max(ans, i)
for st in range(D + 14 + 1):
    l = 0
    for i in range(1, D + 1):
        if "x" * i == "".join(C[st: st + i]):
            l = max(l, i)
    E = []
    for i in range(len(C)):
        if st <= i < st + l:
            E.append("o")
        else:
            E.append(C[i])
    for i in range(14 + D, 0, -1):
        if "o" * i in "".join(E):
            ans = max(ans, i)
            break
print(ans)
0