結果
問題 | No.279 木の数え上げ |
ユーザー |
|
提出日時 | 2015-09-19 10:57:26 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 49 ms / 2,000 ms |
コード長 | 514 bytes |
コンパイル時間 | 542 ms |
コンパイル使用メモリ | 71,832 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-14 15:12:04 |
合計ジャッジ時間 | 1,675 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <iostream> #include <algorithm> #include <map> using namespace std; class range {private: struct I{int x;int operator*(){return x;}bool operator!=(I& lhs){return x<lhs.x;}void operator++(){++x;}};I i,n; public:range(int n):i({0}),n({n}){}range(int i,int n):i({i}),n({n}){}I& begin(){return i;}I& end(){return n;}}; int main(void) { string s; cin >> s; map<char, int> kort; for(char ch : s) { kort[ch]++; } int res = min({kort['t'], kort['r'], kort['e']/2}); printf("%d\n", res); return 0; }