結果
問題 | No.341 沈黙の期間 |
ユーザー |
|
提出日時 | 2016-02-17 21:30:39 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 486 bytes |
コンパイル時間 | 412 ms |
コンパイル使用メモリ | 55,520 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 07:34:08 |
合計ジャッジ時間 | 988 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
#include <iostream>#include <string>int main(){std::ios::sync_with_stdio(false);std::cin.tie(0);int cnt=0, max=-1;char c;std::string multiChar;while(1){multiChar.clear();for(int i=0; i<3; ++i){std::cin.get(c);multiChar.push_back(c);if(c=='\n') break;}if(multiChar=="…") ++cnt;else{max = (max < cnt) ? cnt : max;cnt=0;}if(multiChar=="\n") break;}std::cout << max << "\n";return 0;}