結果

問題 No.279 木の数え上げ
ユーザー おきょん.おきょん.
提出日時 2022-01-10 20:31:00
言語 C++23(draft)
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 21 ms / 2,000 ms
コード長 569 bytes
コンパイル時間 4,073 ms
コンパイル使用メモリ 260,376 KB
実行使用メモリ 5,360 KB
最終ジャッジ日時 2023-08-09 05:22:10
合計ジャッジ時間 6,061 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,384 KB
testcase_01 AC 2 ms
4,384 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,384 KB
testcase_04 AC 1 ms
4,384 KB
testcase_05 AC 1 ms
4,384 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,384 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 19 ms
4,384 KB
testcase_11 AC 5 ms
4,380 KB
testcase_12 AC 13 ms
4,380 KB
testcase_13 AC 3 ms
4,384 KB
testcase_14 AC 21 ms
5,360 KB
testcase_15 AC 17 ms
4,380 KB
testcase_16 AC 16 ms
4,380 KB
testcase_17 AC 19 ms
4,512 KB
testcase_18 AC 11 ms
4,380 KB
testcase_19 AC 19 ms
4,384 KB
testcase_20 AC 20 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//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;
}
0