結果
問題 | No.424 立体迷路 |
ユーザー | 👑 testestest |
提出日時 | 2017-02-08 07:00:57 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 460 bytes |
コンパイル時間 | 637 ms |
コンパイル使用メモリ | 20,480 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-07 12:18:43 |
合計ジャッジ時間 | 1,432 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 0 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 1 ms
5,376 KB |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | AC | 1 ms
5,376 KB |
testcase_07 | AC | 1 ms
5,376 KB |
testcase_08 | AC | 0 ms
5,376 KB |
testcase_09 | AC | 1 ms
5,376 KB |
testcase_10 | AC | 1 ms
5,376 KB |
testcase_11 | AC | 1 ms
5,376 KB |
testcase_12 | AC | 1 ms
5,376 KB |
testcase_13 | AC | 1 ms
5,376 KB |
testcase_14 | AC | 0 ms
5,376 KB |
testcase_15 | AC | 1 ms
5,376 KB |
testcase_16 | AC | 0 ms
5,376 KB |
testcase_17 | AC | 1 ms
5,376 KB |
testcase_18 | AC | 1 ms
5,376 KB |
testcase_19 | AC | 0 ms
5,376 KB |
testcase_20 | AC | 1 ms
5,376 KB |
testcase_21 | AC | 1 ms
5,376 KB |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | AC | 1 ms
5,376 KB |
testcase_25 | AC | 1 ms
5,376 KB |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class 2 | a,b,x,y; | ^ main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] main.c:2:3: warning: type defaults to ‘int’ in declaration of ‘b’ [-Wimplicit-int] 2 | a,b,x,y; | ^ main.c:2:5: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int] 2 | a,b,x,y; | ^ main.c:2:7: warning: type defaults to ‘int’ in declaration of ‘y’ [-Wimplicit-int] 2 | a,b,x,y; | ^ main.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 3 | f(p,q){ | ^ main.c: In function ‘f’: main.c:3:1: warning: type of ‘p’ defaults to ‘int’ [-Wimplicit-int] main.c:3:1: warning: type of ‘q’ defaults to ‘int’ [-Wimplicit-int] main.c:5:17: warning: implicit declaration of function ‘abs’ [-Wimplicit-function-declaration] 5 | abs(s[p-1][q]-s[p][q])<2&&f(p-1,q); | ^~~ main.c:1:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘abs’ +++ |+#include <stdlib.h> 1 | char s[199][99]; main.c: At top level: main.c:15:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 15 | main(i){ | ^~~~ main.c: In function ‘main’: main.c:15:1: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int] main.c:16:9: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 16 | scanf("%*d%*d%d%d%d%d ",&a,&b,&x,&y); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | char s[199][99]; main.c:16:9: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 16 | scanf("%*d%*d%d%d%d%d ",&a,&b,&x,&y); | ^~~~~ main.c:16:9: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:17:14: warning: i
ソースコード
char s[199][99]; a,b,x,y; f(p,q){ if(!s[p+98][q]++){ abs(s[p-1][q]-s[p][q])<2&&f(p-1,q); abs(s[p+1][q]-s[p][q])<2&&f(p+1,q); abs(s[p][q-1]-s[p][q])<2&&f(p,q-1); abs(s[p][q+1]-s[p][q])<2&&f(p,q+1); s[p-2][q]==s[p][q]&&f(p-2,q); s[p+2][q]==s[p][q]&&f(p+2,q); s[p][q-2]==s[p][q]&&f(p,q-2); s[p][q+2]==s[p][q]&&f(p,q+2); } } main(i){ scanf("%*d%*d%d%d%d%d ",&a,&b,&x,&y); for(;gets(s[++i]+2);); f(a+1,b+1); a=!puts(s[x+99][y+1]?"YES":"NO"); }