結果
問題 | No.203 ゴールデン・ウィーク(1) |
ユーザー |
![]() |
提出日時 | 2016-03-05 11:10:30 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 293 bytes |
コンパイル時間 | 566 ms |
コンパイル使用メモリ | 55,960 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-09 06:11:11 |
合計ジャッジ時間 | 1,484 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 WA * 5 |
ソースコード
#include<iostream> #include<string> using namespace std; int main(){ string in,C; int c=0,ans=0; cin>>C>>in; C+=in; for(int i=0;i<C.size()-1;i++){ if(C[i]=='o'&&C[i+1]=='o') c++; else{ if(c!=0&&c+1>ans) ans=c+1; c=0; } } if(c!=0&&c+1>ans) ans=c+1; cout<<ans<<endl; }