結果

問題 No.279 木の数え上げ
ユーザー forest3
提出日時 2020-03-17 15:02:04
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 326 bytes
コンパイル時間 1,547 ms
コンパイル使用メモリ 166,672 KB
実行使用メモリ 5,420 KB
最終ジャッジ日時 2024-11-30 22:35:26
合計ジャッジ時間 3,063 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

	int tcnt = 0;
	int rcnt = 0;
	int ecnt = 0;
	for( int i = 0; i < S.size(); i++ ) {
		if( S[i] == 't' ) tcnt++;
		if( S[i] == 'r' ) rcnt++;
		if( S[i] == 'e' ) ecnt++;
	}
	int ans = min( tcnt, min( rcnt, ecnt / 2 ) );

	cout << ans << endl;
}
0