結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー suibaka_ku
提出日時 2017-03-12 03:46:17
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 416 bytes
コンパイル時間 642 ms
コンパイル使用メモリ 74,640 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-18 10:05:00
合計ジャッジ時間 1,584 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
using namespace std;
using ll = long long;

int main() {
    string s, ss;
    cin >> s >> ss;
    s += ss;
    int cnt = 0;
    int res = 0;
    for(int i=0; i<s.size(); ++i) {
        if(s[i] == 'o') {
            res = max(res, ++cnt);
        } else {
            cnt = 0;
        }
    }
    cout << res << endl;
}
0