結果

問題 No.279 木の数え上げ
ユーザー Goryudyuma
提出日時 2015-09-24 21:26:23
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 389 bytes
コンパイル時間 1,328 ms
コンパイル使用メモリ 162,312 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-14 15:13:19
合計ジャッジ時間 2,374 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main()
{
	string S;
	cin >> S;
	vector<int >count(3);
	for(auto x : S)
	{
		switch(x)
		{
			case 't':
			{
				count[0]++;
				break;
			}
			case 'r':
			{
				count[1]++;
				break;
			}
			case 'e':
			{
				count[2]++;
				break;
			}
		}
	}
	count[2] /= 2;
	sort(count.begin() , count.end());
	cout << count[0] << endl;
return 0;
}
0