結果
| 問題 | No.204 ゴールデン・ウィーク(2) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-05 13:51:32 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 298 bytes |
| 記録 | |
| コンパイル時間 | 69 ms |
| コンパイル使用メモリ | 81,024 KB |
| 実行使用メモリ | 81,280 KB |
| 最終ジャッジ日時 | 2026-07-18 07:59:36 |
| 合計ジャッジ時間 | 5,191 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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