結果
| 問題 |
No.203 ゴールデン・ウィーク(1)
|
| コンテスト | |
| ユーザー |
beet
|
| 提出日時 | 2018-06-03 20:29:12 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 480 bytes |
| コンパイル時間 | 1,363 ms |
| コンパイル使用メモリ | 167,832 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-18 10:27:34 |
| 合計ジャッジ時間 | 2,119 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}
//INSERT ABOVE HERE
signed main(){
string s,t;
cin>>s>>t;
s+=t;
Int ans=0;
Int n=s.size();
for(Int i=0;i<n;i++){
if(s[i]=='x') continue;
Int j=i;
while(j<n&&s[j]=='o') j++;
chmax(ans,j-i);
}
cout<<ans<<endl;
return 0;
}
beet