結果
問題 |
No.203 ゴールデン・ウィーク(1)
|
ユーザー |
![]() |
提出日時 | 2020-03-05 14:07:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 330 bytes |
コンパイル時間 | 1,442 ms |
コンパイル使用メモリ | 165,900 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-14 01:14:23 |
合計ジャッジ時間 | 2,484 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; s += t; int n = s.size(); int ma = 0; int cnt = 0; for (int i = 0; i < n; ++i) { if (s[i] == 'o') cnt++; else { ma = max(ma, cnt); cnt = 0; } } ma = max(ma, cnt); cout << ma << '\n'; return 0; }