結果

問題 No.341 沈黙の期間
ユーザー chuka231
提出日時 2016-02-12 22:41:59
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 674 bytes
コンパイル時間 671 ms
コンパイル使用メモリ 85,708 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-22 04:44:51
合計ジャッジ時間 1,241 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 3 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<bitset>
#include<vector>
#include<deque>
#include<queue>
#include<map>
#include<set>
#include<stack>
#include<cmath>
#include<iomanip>
#include <functional>
using namespace std;
typedef long long ll;
//--------------------------


int main()
{
	string s;
	cin >> s;
	int max = 0;
	int ans = 0;
	while (s.find("…") != s.npos) {
		int index = s.find("…");
		if (index == 0 || (s[index - 2] != -127 || s[index - 1] != 99)) {
			if (ans > max) max = ans;
			ans = 0;
		}
		s = s.substr(s.find("…") + 2);
		ans++;
	}

	string ss = "…";
	cout << max << endl;

	return 0;
}
0