結果

問題 No.204 ゴールデン・ウィーク(2)
コンテスト
ユーザー hogeover30
提出日時 2015-05-12 18:52:09
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 440 bytes
コンパイル時間 488 ms
コンパイル使用メモリ 58,040 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-13 12:47:23
合計ジャッジ時間 1,733 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
    int d;
    string s, t;
    while (cin>>d>>s>>t) {
        s+=t;
        t=s;
        int res=0;
        for(int i=0;i<14;++i) {
            for(int j=0;i+j<14&&j<d&&s[i+j]=='x';++j) s[i+j]='o';
            for(int j=1;j<=14;++j) if (s.find(string(j, 'o'))!=s.npos) res=max(res, j);
            s=t;
        }
        cout<<res<<endl;
    }
}
0