結果

問題 No.279 木の数え上げ
ユーザー ui_mtc
提出日時 2020-03-15 04:03:17
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 371 bytes
コンパイル時間 1,734 ms
コンパイル使用メモリ 167,084 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-23 22:52:56
合計ジャッジ時間 2,588 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define int long long
using namespace std;
using Graph = vector<vector<int>>;

signed main(){
  string S;
  cin >> S;
  
  int t = 0;
  int r = 0;
  int e = 0;
  for( int i = 0; i < S.size(); i++ ){
    if( S.at(i) == 't' ) t++;
    else if( S.at(i) == 'r' ) r++;
    else if( S.at(i) == 'e' ) e++;
  }
  cout << min({t, r, e/2}) << endl;
  
  
}
0