結果
| 問題 |
No.204 ゴールデン・ウィーク(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-05-08 23:08:28 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 443 bytes |
| コンパイル時間 | 182 ms |
| コンパイル使用メモリ | 6,948 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-13 11:47:18 |
| 合計ジャッジ時間 | 2,119 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 WA * 43 |
ソースコード
D = int(raw_input())
s = ["x"] * 16 + list(raw_input() + raw_input()) + ["x"] * 16
ans = 0
for d in xrange(0, D + 2):
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