結果
問題 |
No.279 木の数え上げ
|
ユーザー |
![]() |
提出日時 | 2016-12-30 22:44:40 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 24 ms / 2,000 ms |
コード長 | 307 bytes |
コンパイル時間 | 1,491 ms |
コンパイル使用メモリ | 158,176 KB |
実行使用メモリ | 5,296 KB |
最終ジャッジ日時 | 2024-12-16 04:16:01 |
合計ジャッジ時間 | 2,646 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string S; int t=0,r=0,e=0,count=0; cin>>S; for(int i=0;i<S.size();i++){ if(S[i]=='t') t++; else if(S[i]=='r') r++; else if(S[i]=='e') e++; } while(t>0 && r>0 && e>1){ count++; t--; r--; e-=2; } cout<<count<<endl; return 0; }