結果

問題 No.279 木の数え上げ
ユーザー okkuukenkenokkuukenken
提出日時 2022-05-07 15:56:59
言語 C++23(draft)
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 2,752 bytes
コンパイル時間 6,052 ms
コンパイル使用メモリ 327,076 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-21 02:27:29
合計ジャッジ時間 7,680 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 12 ms
4,376 KB
testcase_11 AC 4 ms
4,376 KB
testcase_12 AC 8 ms
4,376 KB
testcase_13 AC 3 ms
4,376 KB
testcase_14 AC 13 ms
4,380 KB
testcase_15 AC 11 ms
4,376 KB
testcase_16 AC 10 ms
4,376 KB
testcase_17 AC 12 ms
4,376 KB
testcase_18 AC 7 ms
4,376 KB
testcase_19 AC 12 ms
4,376 KB
testcase_20 AC 12 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//Source.cpp
//いつもの
#ifdef LOCAL
#define _USE_MATH_DEFINES
#include<iostream>
#include<string>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<map>
#include<unordered_set>
#include<unordered_map>
#include<list>
#include<array>
#include<algorithm>
#include<numeric>
#include<cmath>
#include<climits>
#include<iomanip>
#include<cctype>
#include<sstream>
#include<regex>
#include<bitset>
#include<random>
#include<complex>
#include<cassert>
#else
#include<bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#ifdef ONLINE_JUDGE
#include<atcoder/all>
using namespace atcoder;
/*#else
#define gcd __gcd
#define lcm __detail::__lcm*/
#endif
#endif
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#ifdef LOCAL
//*
#include<atcoder/all>
using namespace atcoder;
//*/
unsigned popcount(unsigned x){
	return __popcnt(x);
}
unsigned popcountll(ull x){
	return __popcnt64(x);
}
unsigned parity(unsigned x){
	return popcount(x)%2;
}
unsigned parityll(ull x){
	return popcountll(x)%2;
}
unsigned clz(unsigned x){
	if(x==0)
		throw;
	unsigned cnt=__lzcnt(x);
	return cnt;
}
unsigned clzll(ull x){
	if(x==0)
		throw;
	unsigned cnt=__lzcnt64(x);
	return cnt;
}
unsigned ctz(unsigned x){
	if(x==0)
		throw;
	x&=~x+1;
	unsigned cnt=0;
	if(x&0xffff0000)
		cnt|=16;
	if(x&0xff00ff00)
		cnt|=8;
	if(x&0xf0f0f0f0)
		cnt|=4;
	if(x&0xcccccccc)
		cnt|=2;
	if(x&0xaaaaaaaa)
		cnt|=1;
	return cnt;
}
unsigned ctzll(ull x){
	if(x==0)
		throw;
	x&=~x+1;
	unsigned cnt=0;
	if(x&0xffffffff00000000)
		cnt|=32;
	if(x&0xffff0000ffff0000)
		cnt|=16;
	if(x&0xff00ff00ff00ff00)
		cnt|=8;
	if(x&0xf0f0f0f0f0f0f0f0)
		cnt|=4;
	if(x&0xcccccccccccccccc)
		cnt|=2;
	if(x&0xaaaaaaaaaaaaaaaa)
		cnt|=1;
	return cnt;
}
unsigned ffs(unsigned x){
	if(x==0)
		return 0;
	return ctz(x)+1;
}
unsigned ffsll(ull x){
	if(x==0)
		return 0;
	return ctzll(x)+1;
}
#define __builtin_popcount popcount
#define __builtin_popcountll popcountll
#define __builtin_parity parity
#define __builtin_parityll parityll
#define __builtin_clz clz
#define __builtin_clzll clzll
#define __builtin_ctz ctz
#define __builtin_ctzll ctzll
#define __builtin_ffs ffs
#define __builtin_ffsll ffsll
#endif
constexpr int mod=1e9+7;
constexpr int Mod=998244353;
constexpr int inf=mod;
constexpr ll linf=(ll)mod*mod;
struct fastio{
	fastio(){
		cin.tie(0);
		ios::sync_with_stdio(0);
		cout<<fixed<<setprecision(20);
	};
}fio;
template<class T>
bool chmax(T&a,const T&b){
	if(a<b){
		a=b;
		return 1;
	}
	return 0;
}
template<class T>
bool chmin(T&a,const T&b){
	if(a>b){
		a=b;
		return 1;
	}
	return 0;
}
int cnt[128];
int main(){
	char s;
	while(cin>>s)
		cnt[s]++;
	cout<<min({cnt['t'],cnt['r'],cnt['e']/2})<<endl;
}
0