結果

問題 No.341 沈黙の期間
ユーザー forest3
提出日時 2020-05-10 12:30:30
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 383 bytes
コンパイル時間 2,105 ms
コンパイル使用メモリ 166,284 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-07 13:08:44
合計ジャッジ時間 1,855 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main()
{
	string S;
	cin >> S;

	int N = S.size();
	int ans = 0;
	int len = 0;
	for( int i = 0; i < N - 2; i++ ) {
		int a = S[i] & 0xff;
		int b = S[i + 1] & 0xff;
		int c = S[i + 2] & 0xff;
		if( a == 0xe2 && b == 0x80 && c == 0xa6 ) {
			len++;
			i += 2;
		}
		else len = 0;
		ans = max( ans, len );
	}

	cout << ans << endl;
}
0