結果

問題 No.325 マンハッタン距離2
ユーザー FF256grhyFF256grhy
提出日時 2015-12-27 02:08:43
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 262 bytes
コンパイル時間 609 ms
コンパイル使用メモリ 20,680 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 11:09:42
合計ジャッジ時間 1,713 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 0 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 0 ms
4,348 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:64: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | typedef long long l;l s,t,q,i,m;l f(l n){n+=m;n=n>0?n*-~n/2:0;}main(u,v,d,x,y){scanf("%lld%lld%d%d%d",&s,&t,&u,&v,&d);for(q=s*u<=0&t*v<=0;x=s>0?s:0,y=t>1?t:1,m=d-x-y,x-=u,y-=v,i++<4;x=s,s=-v,v=u,u=-t,t=x)x<1&y<1?q+=f(1)-f(x)-f(y)+f(x+y-1):0;i=!printf("%lld",q);}
      |                                                                ^~~~
main.c: In function ‘main’:
main.c:1:64: warning: type of ‘u’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:64: warning: type of ‘v’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:64: warning: type of ‘d’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:64: warning: type of ‘x’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:64: 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 s,t,q,i,m;l f(l n){n+=m;n=n>0?n*-~n/2:0;}main(u,v,d,x,y){scanf("%lld%lld%d%d%d",&s,&t,&u,&v,&d);for(q=s*u<=0&t*v<=0;x=s>0?s:0,y=t>1?t:1,m=d-x-y,x-=u,y-=v,i++<4;x=s,s=-v,v=u,u=-t,t=x)x<1&y<1?q+=f(1)-f(x)-f(y)+f(x+y-1):0;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 s,t,q,i,m;l f(l n){n+=m;n=n>0?n*-~n/2:0;}main(u,v,d,x,y){scanf("%lld%lld%d%d%d",&s,&t,&u,&v,&d);for(q=s*u<=0&t*v<=0;x=s>0?s:0,y=t>1?t:1,m=d-x-y,x-=u,y-=v,i++<4;x=s,s=-v,v=u,u=-t,t=x)x<1&y<1?q+=f(1)-f(x)-f(y)+f(x+y-1):0;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;l s,t,q,i,m;l f(l n){n+=m;n=n>0?n*-~n/2:0;}main(u,v,d,x,y){scanf("%lld%lld%d%d%d",&s,&t,&u,&v,&d);for(q=s*u<=0&t*v<=0;x=s>0?s:0,y=t>1?t:1,m=d-x-y,x-=u,y-=v,i++<4;x=s,s=

ソースコード

diff #

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