結果
問題 |
No.203 ゴールデン・ウィーク(1)
|
ユーザー |
![]() |
提出日時 | 2016-08-05 18:26:50 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 497 bytes |
コンパイル時間 | 499 ms |
コンパイル使用メモリ | 66,308 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-18 09:45:39 |
合計ジャッジ時間 | 1,254 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include<iostream> #include<algorithm> #include<stdio.h> #include<stdlib.h> #include<vector> #include<string> #include<sstream> #include<math.h> using namespace std; int main(){ string str1; string str2; cin >> str1; cin >> str2; string str = str1 + str2; int cnt=-1; int tmp=0; for(int i=0;i<str.size();i++){ if(str[i] == 'o'){ tmp++; }else{ if(cnt < tmp) cnt = tmp; tmp=0; } } if(cnt < tmp) cnt = tmp; cout << cnt << endl; return 0; }