結果

問題 No.279 木の数え上げ
ユーザー michonz4
提出日時 2019-06-10 20:31:46
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 23 ms / 2,000 ms
コード長 346 bytes
コンパイル時間 977 ms
コンパイル使用メモリ 64,956 KB
実行使用メモリ 5,292 KB
最終ジャッジ日時 2024-10-06 00:48:13
合計ジャッジ時間 2,108 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
  string s;
  cin >> s;
  
  vector<int> v(3);
  v[0]=count(s.begin(), s.end(), 't');
  v[1]=count(s.begin(), s.end(), 'r');
  v[2]=count(s.begin(), s.end(), 'e')/2;

  sort(v.begin(), v.end());

  cout << v[0] << endl;
  return 0;
}
0