結果
| 問題 | No.279 木の数え上げ |
| コンテスト | |
| ユーザー |
springroll
|
| 提出日時 | 2018-10-23 00:31:41 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 37 ms / 2,000 ms |
| コード長 | 414 bytes |
| 記録 | |
| コンパイル時間 | 1,615 ms |
| コンパイル使用メモリ | 189,988 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-13 12:17:37 |
| 合計ジャッジ時間 | 2,317 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
#include"bits/stdc++.h"
using namespace std;
int main() {
string s;
cin >> s;
map<char,int> m;
for (int i = 0; i < s.length(); i++) {
m[s[i]]++;
}
int t,r,e;
t=r=e=0;
for (auto itr = m.begin(); itr != m.end(); itr++) {
if(itr->first == 't') t=itr->second;
if(itr->first == 'r') r=itr->second;
if(itr->first == 'e') e=itr->second;
}
e /= 2;
int ans = min(t,min(r,e));
cout << ans << endl;
}
springroll