結果
問題 |
No.204 ゴールデン・ウィーク(2)
|
ユーザー |
![]() |
提出日時 | 2020-05-13 23:21:08 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 356 bytes |
コンパイル時間 | 298 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-14 15:45:42 |
合計ジャッジ時間 | 3,167 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 35 WA * 11 |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() d=int(input()) C=input() C+=input() C="x"*d+C+"x"*d def ct(X): ret=0 cur=0 for i in range(len(X)): if X[i]=="o": cur+=1 else: ret=max(ret,cur) cur=0 else: ret=max(ret,cur) return ret ans=d for i in range(d+14): ans=max(ans,ct(C[:i]+"o"*d+C[i+d:])) print(ans)