結果

問題 No.325 マンハッタン距離2
ユーザー FF256grhyFF256grhy
提出日時 2015-12-22 14:25:52
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 268 bytes
コンパイル時間 131 ms
コンパイル使用メモリ 21,088 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-18 22:36:33
合計ジャッジ時間 997 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 1 ms
4,348 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 1 ms
4,348 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 1 ms
4,348 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 1 ms
4,348 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:60: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | typedef long long l;l q,i,m;l f(l n){n+=m;n=n>0?n*-~n/2:0;}main(s,t,u,v,d,x,y){scanf("%d%d%d%d%d",&s,&t,&u,&v,&d);for(q=!(s>0|0>u|t>0|0>v);x=s>0?s:0,y=t>1?t:1,m=d-x-y+1,x-=u+1,y-=v+1,i++<4;x=s,s=-v,v=u,u=-t,t=x)if(x<0&y<0)q+=f(0)-f(x)-f(y)+f(x+y);i=!printf("%lld",q);}
      |                                                            ^~~~
main.c: In function ‘main’:
main.c:1:60: warning: type of ‘s’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:60: warning: type of ‘t’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:60: warning: type of ‘u’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:60: warning: type of ‘v’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:60: warning: type of ‘d’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:60: warning: type of ‘x’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:60: warning: type of ‘y’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:80: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
    1 | typedef long long l;l q,i,m;l f(l n){n+=m;n=n>0?n*-~n/2:0;}main(s,t,u,v,d,x,y){scanf("%d%d%d%d%d",&s,&t,&u,&v,&d);for(q=!(s>0|0>u|t>0|0>v);x=s>0?s:0,y=t>1?t:1,m=d-x-y+1,x-=u+1,y-=v+1,i++<4;x=s,s=-v,v=u,u=-t,t=x)if(x<0&y<0)q+=f(0)-f(x)-f(y)+f(x+y);i=!printf("%lld",q);}
      |                                                                                ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
  +++ |+#include <stdio.h>
    1 | typedef long long l;l q,i,m;l f(l n){n+=m;n=n>0?n*-~n/2:0;}main(s,t,u,v,d,x,y){scanf("%d%d%d%d%d",&s,&t,&u,&v,&d);for(q=!(s>0|0>u|t>0|0>v);x=s>0?s:0,y=t>1?t:1,m=d-x-y+1,x-=u+1,y-=v+1,i++<4;x=s,s=-v,v=u,u=-t,t=x)if(x<0&y<0)q+=f(0)-f(x)-f(y)+f(x+y);i=!printf("%lld",q);}
main.c:1:80: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
    1 | typedef long long l;

ソースコード

diff #

typedef long long l;l q,i,m;l f(l n){n+=m;n=n>0?n*-~n/2:0;}main(s,t,u,v,d,x,y){scanf("%d%d%d%d%d",&s,&t,&u,&v,&d);for(q=!(s>0|0>u|t>0|0>v);x=s>0?s:0,y=t>1?t:1,m=d-x-y+1,x-=u+1,y-=v+1,i++<4;x=s,s=-v,v=u,u=-t,t=x)if(x<0&y<0)q+=f(0)-f(x)-f(y)+f(x+y);i=!printf("%lld",q);}
0