結果
問題 |
No.341 沈黙の期間
|
ユーザー |
|
提出日時 | 2016-02-12 22:34:23 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 880 bytes |
コンパイル時間 | 701 ms |
コンパイル使用メモリ | 91,948 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-22 04:43:17 |
合計ジャッジ時間 | 1,296 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 4 |
ソースコード
#include <cstdlib> #include <cctype> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <iostream> #include <sstream> #include <map> #include <set> #include <queue> #include <stack> #include <fstream> #include <numeric> #include <iomanip> #include <bitset> #include <list> #include <stdexcept> #include <functional> #include <utility> #include <ctime> using namespace std; int main(int argc, const char * argv[]) { string input; cin >> input; std::size_t found = 0; std::size_t tmp_found = 0; int count = 0; int max_count = 0; while ((found = input.find("…",found))!=std::string::npos) { if (tmp_found+3 == found) count++; else count = 1; max_count = max(max_count,count); tmp_found = found++; } cout << count << endl; return 0; }