結果
| 問題 | No.204 ゴールデン・ウィーク(2) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-05 13:51:32 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 298 bytes |
| 記録 | |
| コンパイル時間 | 138 ms |
| コンパイル使用メモリ | 77,316 KB |
| 最終ジャッジ日時 | 2025-12-03 21:24:29 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 WA * 6 RE * 2 |
ソースコード
D = input()
s = raw_input()+raw_input()
o = map(len, filter(None, s.split('x')))
x = map(len, filter(None, s.split('o')))
if s.startswith('x'):
x.pop(0)
if s.endswith('x'):
x.pop()
ans = max(o)+D
for i in xrange(len(x)):
if x[i] <= D:
ans = max(ans, o[i]+x[i]+o[i+1])
print ans