結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー zombietan
提出日時 2016-05-31 05:14:57
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 266 bytes
コンパイル時間 411 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-13 14:02:46
合計ジャッジ時間 2,782 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

import re
d = int(input())
W1 = input()
W2 = input()
GW = W1 + W2

pat = re.compile('o+')
ans = [0]
for i in range(14-d):
    s = GW[:i] + 'o'*d + GW[i+d:]
    match = pat.findall(s)
    if match:
        ans.append(max([len(x) for x in match]))
    
print(max(ans))
0