結果

問題 No.341 沈黙の期間
ユーザー IL_mstaIL_msta
提出日時 2017-01-08 19:39:40
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,140 bytes
コンパイル時間 684 ms
コンパイル使用メモリ 89,916 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-08-22 17:47:01
合計ジャッジ時間 1,450 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 2 ms
4,388 KB
testcase_12 WA -
testcase_13 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
 
#include <iostream>
#include <iomanip>
#include <sstream>
 
#include <algorithm>
#include <cmath>
 
#include <string>
#include <queue>
#include <vector>
#include <complex>
#include <set>
#include <map>
#include <stack>
#include <list>

#include <valarray>

#include<cassert>//assert();
//#include <random>//xAOJ
/////////
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)
#define P(p) cout<<(p)<<endl;
 
#define PII pair<int,int>
/////////
typedef long long LL;
typedef long double LD;
typedef unsigned long long ULL;
/////////
using namespace::std;
/////////
/////////

void solve(){
	char S[302];
	cin >> S;
	bool flag = false;
	int ans = 0;
	int cou = 0;
	for(int i=0;i<298;++i){
		//if( S[i] == 0xE2 && S[i+1] == 0x80 && S[i+2] == 0xA6){
		//0x81,0x63
		if( S[i] == (char)0x81 && S[i+1] == (char)0x63 ){
			++cou;
			//i += 2;
			i += 1;
		}else{
			ans = max(ans,cou);
			cou = 0;
		}
	}
	cout << ans << endl;
}

int main(void){
    std::cin.tie(0); 
    std::ios::sync_with_stdio(false);
    std::cout << std::fixed;//
    //cout << setprecision(16);//
	
	solve();
	
	return 0;
}
0