結果
| 問題 | No.279 木の数え上げ |
| コンテスト | |
| ユーザー |
Yut176
|
| 提出日時 | 2016-06-12 20:33:20 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 14 ms / 2,000 ms |
| コード長 | 492 bytes |
| 記録 | |
| コンパイル時間 | 521 ms |
| コンパイル使用メモリ | 84,808 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-02 01:57:50 |
| 合計ジャッジ時間 | 1,630 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<stdlib.h>
#include<vector>
#include<string>
#include<sstream>
using namespace std;
int main(){
string s;
cin >> s;
int a[3]={0,0,0};
for(int i=0;i<s.size();i++){
if(s[i]=='t'){
a[0]++;
}
if(s[i]=='r'){
a[1]++;
}
if(s[i]=='e'){
a[2]++;
}
}
a[0] *= 2;
a[1] *= 2;
// cout << a[0] << a[1] << a[2] << endl;
cout << min(min(a[0],a[1]),a[2])/2 << endl;
return 0;
}
Yut176