結果

問題 No.204 ゴールデン・ウィーク(2)
コンテスト
ユーザー roiti46
提出日時 2015-05-08 22:48:47
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 444 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 139 ms
コンパイル使用メモリ 77,476 KB
最終ジャッジ日時 2025-12-03 15:03:14
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 35 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

D = int(raw_input())
s = ["x"] * 16 + list(raw_input() + raw_input()) + ["x"] * 16
ans = 0
for d in xrange(0, D + 1):
    for i in xrange(46):
#        if "xo" in s[i:i + d] and "ox" in s[i:i + d]: continue
        ss = s[:]
        ss[i:i + d] = "o" * d
        cnt = 0
        for si in ss:
            if si == "o": cnt += 1
            else:
                ans = max(ans, cnt)
                cnt = 0
        ans = max(ans, cnt)
print ans
0