結果
問題 | No.279 木の数え上げ |
ユーザー |
![]() |
提出日時 | 2019-04-14 22:02:12 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 453 bytes |
コンパイル時間 | 118 ms |
コンパイル使用メモリ | 28,416 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-19 17:05:12 |
合計ジャッジ時間 | 931 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
コンパイルメッセージ
main.c: In function 'ins': main.c:9:14: warning: implicit declaration of function 'getchar_unlocked' [-Wimplicit-function-declaration] 9 | #define gc() getchar_unlocked() | ^~~~~~~~~~~~~~~~ main.c:17:18: note: in expansion of macro 'gc' 17 | do f[c = gc()]++; | ^~
ソースコード
// yukicoder: No.279 木の数え上げ// 2019.4.14 bal4u#include <stdio.h>int f[128];#if 1#define gc() getchar_unlocked()#else#define gc() getchar()#endifvoid ins() // 文字列の入力 スペース以下の文字で入力終了{int c;do f[c = gc()]++;while (c > ' ');}int main(){int ans;ins();ans = f['t'];if (ans > f['r']) ans = f['r'];if (ans > f['e'] / 2) ans = f['e'] >> 1;printf("%d\n", ans);return 0;}