結果
問題 | No.341 沈黙の期間 |
ユーザー |
|
提出日時 | 2016-02-17 21:30:39 |
言語 | C++11 (gcc 11.4.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 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,812 KB |
testcase_01 | AC | 2 ms
6,940 KB |
testcase_02 | AC | 2 ms
6,940 KB |
testcase_03 | AC | 2 ms
6,940 KB |
testcase_04 | AC | 2 ms
6,944 KB |
testcase_05 | AC | 2 ms
6,944 KB |
testcase_06 | AC | 2 ms
6,940 KB |
testcase_07 | AC | 1 ms
6,940 KB |
testcase_08 | AC | 2 ms
6,944 KB |
testcase_09 | AC | 1 ms
6,940 KB |
testcase_10 | AC | 1 ms
6,944 KB |
testcase_11 | AC | 2 ms
6,944 KB |
testcase_12 | AC | 2 ms
6,944 KB |
testcase_13 | AC | 1 ms
6,940 KB |
ソースコード
#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; }