結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー aaaaaaiu
提出日時 2019-08-08 23:15:32
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 497 bytes
コンパイル時間 1,996 ms
コンパイル使用メモリ 193,452 KB
最終ジャッジ日時 2025-01-07 11:02:42
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 14 WA * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    int d;
    string s,t;
    cin>>d>>s>>t;
    s+=t;
    int mx=0;
    for (int i=0;i<14;i++) {
        int k=0;
        for (int j=0;j<14;j++) {
            if (j==i&&j+d<=14) {
                k+=d;
                j+=d;
            } else if (s[j]=='o') {
                k++;
            } else {
                k=0;
            }
            mx=max(mx,k);
        }
    }
    cout<<mx<<endl;
    return 0;
}
0