結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー 👑 CleyL
提出日時 2020-03-01 19:14:44
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 617 bytes
コンパイル時間 497 ms
コンパイル使用メモリ 65,564 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-13 20:47:19
合計ジャッジ時間 1,715 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
    int n;cin>>n;
    string s;cin>>s;
    string t;cin>>t;
    s += t;
    int ans = 0;
    for(int i = 0; 14-n > i; i++){
        //i ~ i+n-1日が休みになりますよー!!!やったね!!!!
        int tmx = 0;
        int nya = 0;
        for(int j = 0; 14 > j; j++){
            if(i <= j && j <= i+n-1 || s[j] == 'o'){
                nya++;
            }else{
                tmx = max(tmx,nya);
                nya=0;
            }
        }
        tmx = max(tmx,nya);
        ans = max(tmx,ans);
        
    }
    cout << ans << endl;
}
0