結果
問題 | No.279 木の数え上げ |
ユーザー |
|
提出日時 | 2018-03-08 14:58:25 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 20 ms / 2,000 ms |
コード長 | 371 bytes |
コンパイル時間 | 1,430 ms |
コンパイル使用メモリ | 167,516 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-05 07:50:52 |
合計ジャッジ時間 | 2,748 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; namespace { int iCnt[ 10 ]; } int main() { int i; char S[ 1000100 ]; char C; cin >> S; i = 0; while( C = S[ i ] ) { if( C == 't' ) iCnt[ 0 ]++; else if( C == 'r' ) iCnt[ 1 ]++; else if( C == 'e' ) iCnt[ 2 ]++; i++; } iCnt[ 2 ] /= 2; cout << *min_element( iCnt, iCnt + 3 ) << endl; return 0; }