結果
| 問題 | No.279 木の数え上げ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-16 02:13:38 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 15 ms / 2,000 ms |
| + 9µs | |
| コード長 | 621 bytes |
| 記録 | |
| コンパイル時間 | 1,906 ms |
| コンパイル使用メモリ | 336,460 KB |
| 実行使用メモリ | 9,396 KB |
| 最終ジャッジ日時 | 2026-07-12 06:45:46 |
| 合計ジャッジ時間 | 4,058 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
/////////////////// メイン ///////////////////
int main () {
//////////////////// 入力 ////////////////////
string s;
cin >> s;
//////////////// 出力変数定義 ////////////////
int result = 0;
//////////////////// 処理 ////////////////////
int t = 0;
int r = 0;
int e = 0;
for (char c : s) {
if (c=='t') t++;
if (c=='r') r++;
if (c=='e') e++;
}
result = min({t,r,e/2});
//////////////////// 出力 ////////////////////
cout << result << endl;
//////////////////// 終了 ////////////////////
return 0;
}