結果
問題 |
No.279 木の数え上げ
|
ユーザー |
![]() |
提出日時 | 2016-09-25 22:13:20 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 22 ms / 2,000 ms |
コード長 | 505 bytes |
コンパイル時間 | 586 ms |
コンパイル使用メモリ | 69,732 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-18 12:57:35 |
合計ジャッジ時間 | 1,982 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include<stdio.h> #include <vector> #include <list> #include <map> #include <set> #include <queue> #include <stack> #include <algorithm> #include <sstream> #include <iostream> #include <string> #include <stdio.h> using namespace std; int main() { string S; cin >> S; int cnt = 0, c[3] = {}; for (int i = 0; i < S.size(); i++) { if (S[i] == 't') c[0]++; if (S[i] == 'r') c[1]++; if (S[i] == 'e') c[2]++; } c[2] /= 2; cnt = min(c[0], min(c[1], c[2])); cout << cnt << endl; return 0; }