結果

問題 No.279 木の数え上げ
ユーザー kaito_tateyama
提出日時 2017-08-12 05:29:10
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 453 bytes
コンパイル時間 681 ms
コンパイル使用メモリ 72,160 KB
実行使用メモリ 5,292 KB
最終ジャッジ日時 2024-10-12 23:22:51
合計ジャッジ時間 2,200 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
#define REP(i,n) for(int i = 0; i < (n); i++)

int main(){


		string s; cin>>s;
		int a=s.size();
		int b[3] = {};
		REP(i,a){
				if (s[i] == 't') {
						b[0]++;
				}else if (s[i] == 'r') {
						b[1]++;
				}else if (s[i] == 'e') {
						b[2]++;
				}
		}
		int c = min(b[0],min(b[1],(b[2] / 2)));
		cout << c<<"\n";
		return 0;
}
0