結果
問題 |
No.290 1010
|
ユーザー |
![]() |
提出日時 | 2017-03-02 19:27:00 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 578 bytes |
コンパイル時間 | 562 ms |
コンパイル使用メモリ | 19,072 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-13 01:35:23 |
合計ジャッジ時間 | 1,386 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class 2 | _;main(){ | ^ main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘_’ [-Wimplicit-int] main.c:2:3: warning: return type defaults to ‘int’ [-Wimplicit-int] 2 | _;main(){ | ^~~~ main.c: In function ‘main’: main.c:3:9: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration] 3 | gets(&_); | ^~~~ main.c:4:16: warning: implicit declaration of function ‘getchar’ [-Wimplicit-function-declaration] 4 | switch(getchar()){ | ^~~~~~~ main.c:1:1: note: ‘getchar’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’? +++ |+#include <stdio.h> 1 | #define p(s) puts(#s);return 0; main.c:1:14: warning: implicit declaration of function ‘puts’ [-Wimplicit-function-declaration] 1 | #define p(s) puts(#s);return 0; | ^~~~ main.c:8:25: note: in expansion of macro ‘p’ 8 | p(YES) | ^ main.c:1:14: note: include ‘<stdio.h>’ or provide a declaration of ‘puts’ 1 | #define p(s) puts(#s);return 0; | ^~~~ main.c:8:25: note: in expansion of macro ‘p’ 8 | p(YES) | ^ /usr/bin/ld: /tmp/ccu2gCLq.o: in function `main': main.c:(.text.startup+0x12): 警告: the `gets' function is dangerous and should not be used.
ソースコード
#define p(s) puts(#s);return 0; _;main(){ gets(&_); switch(getchar()){ case'0': switch(getchar()){ case'0': p(YES) case'1': switch(getchar()){ case'0': switch(getchar()){ case'\n': p(NO) default: p(YES) } case'1': p(YES) default: p(NO) } default: p(NO) } case'1': switch(getchar()){ case'0': switch(getchar()){ case'0': p(YES) case'1': switch(getchar()){ case'\n': p(NO) default: p(YES) } default: p(NO) } case'1': p(YES) default: p(NO) } } }