結果
問題 |
No.279 木の数え上げ
|
ユーザー |
![]() |
提出日時 | 2018-03-28 17:53:20 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 24 ms / 2,000 ms |
コード長 | 417 bytes |
コンパイル時間 | 581 ms |
コンパイル使用メモリ | 65,400 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-25 13:14:06 |
合計ジャッジ時間 | 2,351 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { string s; cin >> s; vector<int> tree(3); for(int i = 0;i < s.length();i++){ if(s[i] == 't')tree[0]++; else if(s[i] == 'r')tree[1]++; else if(s[i] == 'e')tree[2]++; } tree[2]/=2; sort(tree.begin(),tree.end()); cout << tree[0] << endl; return 0; }