結果
| 問題 | No.279 木の数え上げ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-06-14 17:29:45 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 14 ms / 2,000 ms |
| コード長 | 421 bytes |
| 記録 | |
| コンパイル時間 | 380 ms |
| コンパイル使用メモリ | 76,144 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-02 01:58:22 |
| 合計ジャッジ時間 | 1,614 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
string s;
cin >> s;
int cnt_t, cnt_r, cnt_e;
cnt_t = 0;
cnt_r = 0;
cnt_e = 0;
for(int i=0; i<s.length(); i++){
if(s[i] == 't'){
cnt_t++;
}
else if(s[i] == 'r'){
cnt_r++;
}
else if(s[i] == 'e'){
cnt_e++;
}
}
cnt_e/=2;
int result = min(min(cnt_t, cnt_r), cnt_e);
cout << result << endl;
return 0;
}