結果
問題 |
No.204 ゴールデン・ウィーク(2)
|
ユーザー |
|
提出日時 | 2015-05-08 22:32:21 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 354 bytes |
コンパイル時間 | 673 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2024-10-13 11:29:48 |
合計ジャッジ時間 | 1,761 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 WA * 25 |
ソースコード
D = int(raw_input()) s = list(raw_input() + raw_input()) ans = 0 for i in xrange(14 - D + 1): 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