結果
| 問題 | 
                            No.279 木の数え上げ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             springroll
                         | 
                    
| 提出日時 | 2018-10-23 00:31:41 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 52 ms / 2,000 ms | 
| コード長 | 414 bytes | 
| コンパイル時間 | 1,753 ms | 
| コンパイル使用メモリ | 174,116 KB | 
| 実行使用メモリ | 5,296 KB | 
| 最終ジャッジ日時 | 2024-11-19 03:59:12 | 
| 合計ジャッジ時間 | 3,598 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 21 | 
ソースコード
#include"bits/stdc++.h"
using namespace std;
int main() {
	string s;
	cin >> s;
	map<char,int> m;
	for (int i = 0; i < s.length(); i++) {
		m[s[i]]++;
	}
	int t,r,e;
	t=r=e=0;
	for (auto itr = m.begin(); itr != m.end(); itr++) {
		if(itr->first == 't') t=itr->second;
		if(itr->first == 'r') r=itr->second;
		if(itr->first == 'e') e=itr->second;
	}
	e /= 2;
	int ans = min(t,min(r,e));
	cout << ans << endl;
}
            
            
            
        
            
springroll