結果

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

ソースコード

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-1;
            } else if (s[j]=='o') {
                k++;
            } else {
                k=0;
            }
            mx=max(mx,k);
        }
    }
    cout<<mx<<endl;
    return 0;
}
0