結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー |
![]() |
提出日時 | 2015-05-09 00:05:12 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 482 bytes |
コンパイル時間 | 452 ms |
コンパイル使用メモリ | 59,356 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-18 09:06:11 |
合計ジャッジ時間 | 1,326 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include<iostream> #include<algorithm> #include<string> using namespace std; int main() { string s; string s2; int count = 0; int max_day = 0; cin >> s >> s2; for (int i = 0; i < 7; i++){ if (s[i] == 'o'){ count++; } else{ max_day = max(max_day, count); count = 0; } } for (int i = 0; i < 7; i++){ if (s2[i] == 'o'){ count++; } else{ max_day = max(max_day, count); count = 0; } } max_day = max(max_day, count); cout << max_day << endl; }