結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー |
|
提出日時 | 2021-06-08 10:24:40 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 384 bytes |
コンパイル時間 | 2,182 ms |
コンパイル使用メモリ | 193,096 KB |
最終ジャッジ日時 | 2025-01-22 04:52:44 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); string s1, s2; cin >> s1; cin >> s2; s1 += s2; int res = 0; int cnt = 0; for (int i = 0; i < s1.length(); i++) { if (s1[i] == 'o') { cnt++; res = max(res, cnt); } else { cnt = 0; } } res = max(res, cnt); cout << res << '\n'; return 0; }