結果

問題 No.204 ゴールデン・ウィーク(2)
コンテスト
ユーザー pluto77
提出日時 2016-04-14 11:44:37
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 93 ms / 1,000 ms
コード長 342 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 124 ms
コンパイル使用メモリ 77,340 KB
最終ジャッジ日時 2025-12-03 20:16:15
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 46
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#coding: utf-8
##yuki_204

d=int(raw_input())
s1=raw_input()
s2=raw_input()

s='x'*d+s1+s2+'x'*d
res=0
for i in xrange(len(s)):
 maxl=0
 temp=d
 for j in xrange(len(s)):
  if j>=len(s):
   break
  if s[j]=='o':
   maxl+=1
   if j>=i:
    temp=0
  elif j>=i and temp>0:
   temp-=1
   maxl+=1
  else:
   maxl=0
  res=max(maxl,res)
  
print res
0