結果

問題 No.279 木の数え上げ
ユーザー Kaz_nl
提出日時 2017-08-23 20:04:34
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 442 ms
コンパイル使用メモリ 57,552 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-15 13:07:28
合計ジャッジ時間 1,356 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int a[3];

int main() {
  string s;
  int ans = 1000000;
  cin >> s;
  for (auto& e : s) {
    if (e == 't') a[0]++;
    else if (e == 'r') a[1]++;
    else if (e == 'e') a[2]++;
  }
  a[2] /= 2;
  for (auto& e : a) {
    ans = min(ans, e);
  }
  cout << ans << endl;
}
0