結果
| 問題 |
No.279 木の数え上げ
|
| コンテスト | |
| ユーザー |
Lay_ec
|
| 提出日時 | 2015-09-18 22:23:17 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 22 ms / 2,000 ms |
| コード長 | 530 bytes |
| コンパイル時間 | 710 ms |
| コンパイル使用メモリ | 81,388 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-14 15:06:40 |
| 合計ジャッジ時間 | 1,656 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <sstream>
#include <map>
#include <queue>
#include <stack>
using namespace std;
long long dp[110][20010];
long long mod=1000000000+7;
int main(){
string s;
cin>>s;
int cnt[26]={};
for(int i=0;i<s.size();i++) cnt[s[i]-'a']++;
int ans=cnt['t'-'a'];
ans=min(ans,cnt['r'-'a']);
ans=min(ans,cnt['e'-'a']/2);
cout<<ans<<endl;
}
Lay_ec