結果

問題 No.341 沈黙の期間
ユーザー Kura
提出日時 2019-07-22 21:05:46
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 289 bytes
コンパイル時間 1,174 ms
コンパイル使用メモリ 158,980 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-23 18:39:53
合計ジャッジ時間 1,782 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0