結果
問題 |
No.204 ゴールデン・ウィーク(2)
|
ユーザー |
![]() |
提出日時 | 2020-05-13 23:20:48 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 367 bytes |
コンパイル時間 | 334 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-14 15:45:24 |
合計ジャッジ時間 | 2,788 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 46 |
ソースコード
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) print(X) return ret ans=d for i in range(d+14): ans=max(ans,ct(C[:i]+"o"*d+C[i+d:])) print(ans)