結果
問題 |
No.279 木の数え上げ
|
ユーザー |
![]() |
提出日時 | 2024-07-06 09:42:14 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 7 ms / 2,000 ms |
コード長 | 397 bytes |
コンパイル時間 | 896 ms |
コンパイル使用メモリ | 86,520 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-06 09:42:16 |
合計ジャッジ時間 | 1,760 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <iostream> #include <algorithm> using namespace std; using ll = long long; string S; int main(void){ ios::sync_with_stdio(false); cin.tie(nullptr); cin >> S; ll cntt = 0, cntr = 0, cnte = 0; for(char c : S){ if(c == 't')cntt++; if(c == 'r')cntr++; if(c == 'e')cnte++; } cout << min({cntt, cntr, cnte / 2}) << endl; return 0; }