結果
問題 | No.279 木の数え上げ |
ユーザー |
![]() |
提出日時 | 2019-09-04 07:34:41 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 315 bytes |
コンパイル時間 | 2,071 ms |
コンパイル使用メモリ | 174,888 KB |
実行使用メモリ | 5,300 KB |
最終ジャッジ日時 | 2024-12-26 00:24:28 |
合計ジャッジ時間 | 3,294 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string s; map<char,int> n; cin>>s; for(int i=0;i<s.length();i++)if(s[i]=='t'||s[i]=='r'||s[i]=='e')n[s[i]]++; n['e']/=2;int m=n['e']; for(auto i=n.begin();i!=n.end();i++)if(m>i->second)m=i->second; cout<<m<<endl; return 0; }