結果
| 問題 |
No.341 沈黙の期間
|
| コンテスト | |
| ユーザー |
Kura
|
| 提出日時 | 2019-07-22 21:06:20 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 289 bytes |
| コンパイル時間 | 1,989 ms |
| コンパイル使用メモリ | 160,336 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-23 18:39:56 |
| 合計ジャッジ時間 | 1,901 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;cin>>s;
int c=0;
int n=0;
int l=s.length();
string a="…";
for(int i=0;i<l-2;i++){
if(s[i]==a[0]&&s[i+1]==a[1]&&s[i+2]==a[2]){
n++;
i+=2;
c=max(c,n);
}else{n=0;}
}
cout<<c<<endl;
}
Kura