結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー gorugo30gorugo30
提出日時 2021-03-17 20:38:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 561 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 82,356 KB
実行使用メモリ 54,216 KB
最終ジャッジ日時 2024-04-27 13:09:00
合計ジャッジ時間 2,953 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 37 ms
53,360 KB
testcase_02 AC 34 ms
52,712 KB
testcase_03 AC 33 ms
53,016 KB
testcase_04 AC 35 ms
52,576 KB
testcase_05 AC 33 ms
53,316 KB
testcase_06 AC 34 ms
52,980 KB
testcase_07 AC 34 ms
54,152 KB
testcase_08 WA -
testcase_09 AC 34 ms
52,820 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 33 ms
52,612 KB
testcase_13 AC 33 ms
52,536 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 35 ms
52,472 KB
testcase_19 WA -
testcase_20 AC 33 ms
53,436 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 34 ms
52,708 KB
testcase_26 AC 35 ms
53,196 KB
testcase_27 AC 35 ms
52,936 KB
testcase_28 AC 35 ms
52,892 KB
testcase_29 AC 34 ms
52,272 KB
testcase_30 AC 37 ms
53,812 KB
testcase_31 AC 36 ms
52,132 KB
testcase_32 AC 36 ms
52,628 KB
testcase_33 WA -
testcase_34 AC 34 ms
53,072 KB
testcase_35 AC 34 ms
52,960 KB
testcase_36 AC 34 ms
53,104 KB
testcase_37 AC 35 ms
52,592 KB
testcase_38 AC 35 ms
53,888 KB
testcase_39 AC 32 ms
53,068 KB
testcase_40 AC 32 ms
52,252 KB
testcase_41 AC 33 ms
52,692 KB
testcase_42 WA -
testcase_43 AC 33 ms
54,152 KB
testcase_44 AC 33 ms
51,944 KB
testcase_45 AC 34 ms
52,580 KB
testcase_46 AC 35 ms
53,784 KB
testcase_47 WA -
testcase_48 AC 32 ms
52,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

D = int(input())
C = ["x"] * D + list(input()) + list(input()) + ["x"] * D
ans = 0
for i in range(1, 14 + D + 1):
    if "o" * i in "".join(C):
        ans = max(ans, i)
for st in range(15):
    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(21, 0, -1):
        if "o" * i in "".join(E):
            ans = max(ans, i)
            break
print(ans)
0