結果
問題 |
No.204 ゴールデン・ウィーク(2)
|
ユーザー |
![]() |
提出日時 | 2020-03-23 10:51:36 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 673 bytes |
コンパイル時間 | 2,362 ms |
コンパイル使用メモリ | 194,336 KB |
最終ジャッジ日時 | 2025-01-09 09:43:57 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 35 WA * 11 |
ソースコード
#include<bits/stdc++.h> using lint=long long; int main(){ std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false); std::cout.setf(std::ios_base::fixed);std::cout.precision(15); lint n;std::cin>>n; std::vector<lint>a(70); for(lint i=28;i<42;i++){ char c;std::cin>>c; a.at(i)=c=='o'; } lint ans=0; for(lint i=0;i<=56;i++){ auto b=a; for(lint j=i;j<i+n;j++){ b.at(j)=1; } for(lint j=0,k=1;k<70;k++){ if(b.at(k-1)==b.at(k))continue; if(b.at(k-1)&&ans<k-j){ ans=k-j; } j=k; } } std::cout<<ans<<'\n'; }