結果

問題 No.424 立体迷路
ユーザー tailstails
提出日時 2016-10-04 18:22:51
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 123 ms
コンパイル使用メモリ 21,632 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-05 07:11:16
合計ジャッジ時間 876 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:9: warning: ISO C99 requires whitespace after the macro name
    1 | #define A,t=m[x][y],t=abs(s=t-m[x+u][y+v])<2|(t==m[x+u*2][y+v*2]&s>1)*2,f(x+u*t,y+v*t),t=u,u=-v,v=t
      |         ^
main.c:2:1: warning: data definition has no type or storage class
    2 | u,v=1;a,b;char*r="NO",m[120][60];f(x,y,s,t){m[y+60][x]++||(r=x-a|y-b?r:"YES"A A A A);}main(i,x,y){for(scanf("%*d%*d%d%d%d%d ",&x,&y,&a,&b);gets(m[i++]+1););f(x,y);a=!puts(r);}
      | ^
main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘u’ [-Wimplicit-int]
main.c:2:3: warning: type defaults to ‘int’ in declaration of ‘v’ [-Wimplicit-int]
    2 | u,v=1;a,b;char*r="NO",m[120][60];f(x,y,s,t){m[y+60][x]++||(r=x-a|y-b?r:"YES"A A A A);}main(i,x,y){for(scanf("%*d%*d%d%d%d%d ",&x,&y,&a,&b);gets(m[i++]+1););f(x,y);a=!puts(r);}
      |   ^
main.c:2:7: warning: data definition has no type or storage class
    2 | u,v=1;a,b;char*r="NO",m[120][60];f(x,y,s,t){m[y+60][x]++||(r=x-a|y-b?r:"YES"A A A A);}main(i,x,y){for(scanf("%*d%*d%d%d%d%d ",&x,&y,&a,&b);gets(m[i++]+1););f(x,y);a=!puts(r);}
      |       ^
main.c:2:7: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int]
main.c:2:9: warning: type defaults to ‘int’ in declaration of ‘b’ [-Wimplicit-int]
    2 | u,v=1;a,b;char*r="NO",m[120][60];f(x,y,s,t){m[y+60][x]++||(r=x-a|y-b?r:"YES"A A A A);}main(i,x,y){for(scanf("%*d%*d%d%d%d%d ",&x,&y,&a,&b);gets(m[i++]+1););f(x,y);a=!puts(r);}
      |         ^
main.c:2:34: warning: return type defaults to ‘int’ [-Wimplicit-int]
    2 | u,v=1;a,b;char*r="NO",m[120][60];f(x,y,s,t){m[y+60][x]++||(r=x-a|y-b?r:"YES"A A A A);}main(i,x,y){for(scanf("%*d%*d%d%d%d%d ",&x,&y,&a,&b);gets(m[i++]+1););f(x,y);a=!puts(r);}
      |                                  ^
main.c: In function ‘f’:
main.c:2:34: warning: type of ‘x’ defaults to ‘int’ [-Wimplicit-int]
main.c:2:34: warning: type of ‘y’ defaults to ‘int’ [-Wimplicit-int]
main.c:2:34: warning: type of ‘

ソースコード

diff #

#define A,t=m[x][y],t=abs(s=t-m[x+u][y+v])<2|(t==m[x+u*2][y+v*2]&s>1)*2,f(x+u*t,y+v*t),t=u,u=-v,v=t
u,v=1;a,b;char*r="NO",m[120][60];f(x,y,s,t){m[y+60][x]++||(r=x-a|y-b?r:"YES"A A A A);}main(i,x,y){for(scanf("%*d%*d%d%d%d%d ",&x,&y,&a,&b);gets(m[i++]+1););f(x,y);a=!puts(r);}
0