結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー |
|
提出日時 | 2018-06-18 18:50:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 386 bytes |
コンパイル時間 | 552 ms |
コンパイル使用メモリ | 64,880 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-18 10:27:45 |
合計ジャッジ時間 | 1,533 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include <iostream> #include <string> using namespace std; int main(int argc, char* argv[]) { string S1,S2; cin>>S1>>S2; string S=S1+S2; bool bO=false; int num=0; int MaxNum=0; for (int i=0;i<S.size();i++){ if (S[i]=='o'){ if (!bO){ bO=true; } num++; }else{ bO=false; num=0; } if (MaxNum<num){ MaxNum=num; } } cout<<MaxNum<<endl; return 0; }