結果
| 問題 |
No.279 木の数え上げ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-10 20:31:00 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 24 ms / 2,000 ms |
| コード長 | 569 bytes |
| コンパイル時間 | 4,186 ms |
| コンパイル使用メモリ | 260,972 KB |
| 実行使用メモリ | 5,300 KB |
| 最終ジャッジ日時 | 2024-11-15 02:07:24 |
| 合計ジャッジ時間 | 5,531 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
//No.279 木の数え上げ
#pragma GCC optimize("O3")
#pragma GCC target("avx")
#include <bits/stdc++.h>
#define rep(i ,n) for(int i=0;i<(int)(n);++i)
using namespace std;
signed main(){
string s; cin >> s;
int cnt_t = 0;
int cnt_r = 0;
int cnt_e = 0;
rep( i , s.size()){
if( s[i] == 't') ++cnt_t;
else if( s[i] == 'r') ++cnt_r;
else if( s[i] == 'e') ++cnt_e;
}
cnt_e /= 2;
int ans = (int)10e9;
ans = min( ans , cnt_t);
ans = min( ans , cnt_r );
ans = min( ans , cnt_e );
cout << ans << endl;
}