結果

問題 No.279 木の数え上げ
ユーザー 184184
提出日時 2015-09-18 22:26:34
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 352 bytes
コンパイル時間 231 ms
コンパイル使用メモリ 39,320 KB
実行使用メモリ 4,568 KB
最終ジャッジ日時 2023-09-26 12:30:39
合計ジャッジ時間 2,933 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;

//namaega184

int main(){
	char s[100001];scanf("%s",s);
	int tree[4]={};
	int len=strlen(s);
	for(int i=0;i<len;i++){
		if(s[i]=='t')tree[0]++;
		else if(s[i]=='r')tree[1]++;
		else if(s[i]=='e')tree[2]++;
	}
	printf("%d\n",min({tree[0],tree[1],tree[2]/2}));
	return 0;
}
0