結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー h_noson
提出日時 2016-01-21 22:59:07
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 365 bytes
コンパイル時間 473 ms
コンパイル使用メモリ 57,004 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-18 09:39:09
合計ジャッジ時間 1,378 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "iostream"
using namespace std;

int main(){
    string str1,str2;
    int mx,cnt;

    cin >> str1;
    cin >> str2;
    mx = cnt = 0;
    for (auto c : str1 + str2){
        if (c == 'o')
            cnt += 1;
        else {
            mx = max(mx,cnt);
            cnt = 0;
        }
    }
    mx = max(mx,cnt);
    cout << mx << endl;
    return 0;
}
0