結果
| 問題 | No.290 1010 | 
| コンテスト | |
| ユーザー |  %20 | 
| 提出日時 | 2017-03-02 19:39:16 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1 ms / 5,000 ms | 
| コード長 | 521 bytes | 
| コンパイル時間 | 137 ms | 
| コンパイル使用メモリ | 22,528 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-13 01:35:46 | 
| 合計ジャッジ時間 | 873 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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 /usr/include/stdio.h:894,
                 from /usr/include/c++/11/cstdio:42,
                 from main.cpp:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:240:1: note: declared here
  240 | gets (char *__str)
      | ^~~~
main.cpp:5:13: warning: ignoring return value of ‘char* gets(char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |         gets(_);
      |         ~~~~^~~
/usr/bin/ld: /tmp/ccvd8G7b.o: in function `main':
main.cpp:(.text.startup+0x15): 警告: the `gets' function is dangerous and should not be used.
            
            ソースコード
#include<cstdio>
#define p(s) puts(#s);return 0;
#define s switch(getchar_unlocked()){
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)
		}
	}
}
            
            
            
        