結果

問題 No.341 沈黙の期間
コンテスト
ユーザー michonz4
提出日時 2019-12-20 10:40:28
言語 C++14
(gcc 15.2.0 + boost 1.90.0)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 5,000 ms
+ 341µs
コード長 437 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 411 ms
コンパイル使用メモリ 83,072 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-08-11 22:51:37
合計ジャッジ時間 1,876 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <string>
#include <locale>
#include <codecvt>

using namespace std;

int main(){
  string s;
  cin >> s;

  wstring_convert<codecvt_utf8<char32_t>, char32_t> converter;
  u32string res = converter.from_bytes(s);

  int i, cnt=0, max=0;
  for (i=0; i<res.size(); i++) {
    if (res[i]==u'…') {
      cnt++;
      if (cnt>max) max=cnt;
    } else {
      cnt=0;
    }
  }

  cout << max << endl;
	return 0;
}
0