結果
問題 | No.341 沈黙の期間 |
ユーザー |
![]() |
提出日時 | 2019-12-20 10:40:28 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 437 bytes |
コンパイル時間 | 715 ms |
コンパイル使用メモリ | 73,888 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-08 00:06:01 |
合計ジャッジ時間 | 1,123 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
#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; }