結果
| 問題 | No.279 木の数え上げ |
| コンテスト | |
| ユーザー |
🍮かんプリン
|
| 提出日時 | 2019-02-21 03:34:32 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 653 bytes |
| 記録 | |
| コンパイル時間 | 1,396 ms |
| コンパイル使用メモリ | 179,868 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-08 22:21:04 |
| 合計ジャッジ時間 | 3,218 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string s;
int t_c,r_c,e_c;
t_c=r_c=e_c=0;
cin >> s;
rep(i,s.length()) {
switch (s[i]) {
case 't':
t_c++;
break;
case 'r':
r_c++;
break;
case 'e':
e_c++;
break;
}
}
if (t_c>r_c) t_c=r_c;
if (t_c>e_c/2) t_c=e_c/2;
cout << t_c << endl;
return 0;
}
🍮かんプリン