結果
| 問題 | No.290 1010 |
| コンテスト | |
| ユーザー |
%20
|
| 提出日時 | 2017-03-02 19:39:38 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 512 bytes |
| 記録 | |
| コンパイル時間 | 171 ms |
| コンパイル使用メモリ | 38,288 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-05 20:57:58 |
| 合計ジャッジ時間 | 816 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
コンパイルメッセージ
main.cpp:4:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | char _[9];main(){
| ^~~~
main.cpp: In function 'int main()':
main.cpp:5:13: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
5 | gets(_);
| ~~~~^~~
In file included from /home/linuxbrew/.linuxbrew/Cellar/gcc/15.2.0_1/include/c++/15/cstdio:47,
from main.cpp:1:
/usr/include/stdio.h:667:14: note: declared here
667 | extern char *gets (char *__s) __wur __attribute_deprecated__;
| ^~~~
/usr/bin/ld: /tmp/cc6Jc8o6.o: in function `main':
main.cpp:(.text.startup+0xc): 警告: the `gets' function is dangerous and should not be used.
ソースコード
#include<cstdio>
#define p(s) puts(#s);return 0;
#define s switch(getchar()){
char _[9];main(){
gets(_);
s
case'0':
s
case'0':
p(YES)
case'1':
s
case'0':
s
case'\n':
p(NO)
default:
p(YES)
}
case'1':
p(YES)
default:
p(NO)
}
default:
p(NO)
}
case'1':
s
case'0':
s
case'0':
p(YES)
case'1':
s
case'\n':
p(NO)
default:
p(YES)
}
default:
p(NO)
}
case'1':
p(YES)
default:
p(NO)
}
}
}
%20