結果
問題 |
No.341 沈黙の期間
|
ユーザー |
![]() |
提出日時 | 2016-03-04 01:57:50 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 306 bytes |
コンパイル時間 | 377 ms |
コンパイル使用メモリ | 57,240 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-24 14:00:39 |
合計ジャッジ時間 | 902 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 3 WA * 8 |
ソースコード
#include<iostream> #include<string> using namespace std; int main(){ string s; int c=0,ans=0; cin>>s; string a="…"; int a1=a[0],a2=a[1]; for(int i=0;i<s.size();i+=2){ if((int)s[i]==a1&&(int)s[i+1]==a2) c++; else{ if(c>ans) ans=c; c=0; } } if(c>ans) ans=c; cout<<ans<<endl; }