結果
問題 |
No.203 ゴールデン・ウィーク(1)
|
ユーザー |
|
提出日時 | 2019-09-13 15:14:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 486 bytes |
コンパイル時間 | 577 ms |
コンパイル使用メモリ | 69,704 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-04 03:50:21 |
合計ジャッジ時間 | 1,645 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { string s; string tmp; int max_ct = 0; int curr_ct = 0; cin >> s >> tmp; s += tmp; for (int i = 0; i < 14; i++) { if (s[i] == 'o') { curr_ct++; } else { max_ct = max(max_ct, curr_ct); curr_ct = 0; } } max_ct = max(max_ct, curr_ct); cout << max_ct << endl; return 0; }