結果
問題 | No.360 増加門松列 |
ユーザー | %20 |
提出日時 | 2017-07-15 14:31:27 |
言語 | C (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 167 bytes |
コンパイル時間 | 300 ms |
コンパイル使用メモリ | 28,032 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-08 02:22:41 |
合計ジャッジ時間 | 999 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 1 ms
6,816 KB |
testcase_02 | AC | 1 ms
6,820 KB |
testcase_03 | AC | 1 ms
6,816 KB |
testcase_04 | AC | 1 ms
6,816 KB |
testcase_05 | AC | 1 ms
6,820 KB |
testcase_06 | WA | - |
testcase_07 | AC | 1 ms
6,816 KB |
testcase_08 | AC | 1 ms
6,820 KB |
testcase_09 | AC | 1 ms
6,816 KB |
testcase_10 | AC | 1 ms
6,820 KB |
testcase_11 | AC | 1 ms
6,820 KB |
testcase_12 | WA | - |
testcase_13 | AC | 1 ms
6,816 KB |
testcase_14 | AC | 1 ms
6,820 KB |
testcase_15 | AC | 1 ms
6,820 KB |
testcase_16 | AC | 1 ms
6,816 KB |
testcase_17 | AC | 1 ms
6,816 KB |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | AC | 1 ms
6,816 KB |
testcase_21 | AC | 1 ms
6,820 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | D; | ^ main.c:1:1: warning: type defaults to 'int' in declaration of 'D' [-Wimplicit-int] main.c:2:1: warning: data definition has no type or storage class 2 | x[101]; | ^ main.c:2:1: warning: type defaults to 'int' in declaration of 'x' [-Wimplicit-int] main.c:3:1: warning: data definition has no type or storage class 3 | min=100,max=0; | ^~~ main.c:3:1: warning: type defaults to 'int' in declaration of 'min' [-Wimplicit-int] main.c:3:9: warning: type defaults to 'int' in declaration of 'max' [-Wimplicit-int] 3 | min=100,max=0; | ^~~ main.c:4:1: warning: data definition has no type or storage class 4 | f=0; | ^ main.c:4:1: warning: type defaults to 'int' in declaration of 'f' [-Wimplicit-int] main.c:5:1: warning: return type defaults to 'int' [-Wimplicit-int] 5 | main(){ | ^~~~ main.c: In function 'main': main.c:6:15: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | for(;~scanf("%d",&D);){ | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | D; main.c:6:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 6 | for(;~scanf("%d",&D);){ | ^~~~~ main.c:6:15: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:11:9: warning: implicit declaration of function 'puts' [-Wimplicit-function-declaration] 11 | puts(f||x[min]==2||x[max]==2?"NO":"YES"); | ^~~~ main.c:11:9: note: include '<stdio.h>' or provide a declaration of 'puts'
ソースコード
D; x[101]; min=100,max=0; f=0; main(){ for(;~scanf("%d",&D);){ if(++x[D]>2)f=1; if(D<min)min=D; if(D<max)max=D; } puts(f||x[min]==2||x[max]==2?"NO":"YES"); }