結果
| 問題 | No.279 木の数え上げ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-24 12:25:15 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 16 ms / 2,000 ms |
| コード長 | 361 bytes |
| 記録 | |
| コンパイル時間 | 965 ms |
| コンパイル使用メモリ | 182,844 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-27 10:01:55 |
| 合計ジャッジ時間 | 2,163 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); i++)
using namespace std;
typedef long long ll;
int main(){
string s; cin>>s;
int t,r,e; t=r=e=0;
rep(i,s.size()){
if(s[i]=='t') t++;
if(s[i]=='r') r++;
if(s[i]=='e') e++;
}
int ans=0;
while(1){
t-=1;
r-=1;
e-=2;
if(t<0||r<0||e<0) break;
else ans++;
}
cout << ans << endl;
}