結果
| 問題 |
No.341 沈黙の期間
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-02-12 22:35:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 884 bytes |
| コンパイル時間 | 663 ms |
| コンパイル使用メモリ | 90,480 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-22 04:43:47 |
| 合計ジャッジ時間 | 1,210 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
ソースコード
#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 << max_count << endl;
return 0;
}