結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー hiyori
提出日時 2017-08-10 18:09:22
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 371 bytes
コンパイル時間 540 ms
コンパイル使用メモリ 64,124 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-18 10:14:33
合計ジャッジ時間 1,336 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>

#define REP(i,n) for(i=0; i<n; i++)

using namespace std;

int main()
{
    string s,s2;
    cin>>s>>s2;
    s+=s2;
    int i,max=0,holiday=0;
    REP(i,s.length()) {
        if(s[i]=='o') { holiday++; }
        else if(s[i]!='o') { holiday=0; }
        if(max<=holiday) { max=holiday; }
    }
    cout << max << endl;
    return 0;
}
0