結果
| 問題 | No.325 マンハッタン距離2 |
| コンテスト | |
| ユーザー |
FF256grhy
|
| 提出日時 | 2015-12-22 15:58:14 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 268 bytes |
| 記録 | |
| コンパイル時間 | 115 ms |
| コンパイル使用メモリ | 20,736 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-18 18:36:57 |
| 合計ジャッジ時間 | 904 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 20 WA * 4 |
コンパイルメッセージ
main.c:1:65: warning: return type defaults to ‘int’ [-Wimplicit-int]
1 | typedef long long l;l q,i,m;l f(l n){n+=m;return 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,x-=u,y-=v,i++<4;x=s,s=-v,v=u,u=-t,t=x)x<0&y<0?q+=f(1)-f(x)-f(y)+f(x+y-1):0;i=!printf("%lld",q);}
| ^~~~
main.c: In function ‘main’:
main.c:1:65: warning: type of ‘s’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:65: warning: type of ‘t’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:65: warning: type of ‘u’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:65: warning: type of ‘v’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:65: warning: type of ‘d’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:65: warning: type of ‘x’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:65: warning: type of ‘y’ defaults to ‘int’ [-Wimplicit-int]
main.c:1:85: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
1 | typedef long long l;l q,i,m;l f(l n){n+=m;return 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,x-=u,y-=v,i++<4;x=s,s=-v,v=u,u=-t,t=x)x<0&y<0?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 q,i,m;l f(l n){n+=m;return 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,x-=u,y-=v,i++<4;x=s,s=-v,v=u,u=-t,t=x)x<0&y<0?q+=f(1)-f(x)-f(y)+f(x+y-1):0;i=!printf("%lld",q);}
main.c:1:85: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
1 | typedef lo
ソースコード
typedef long long l;l q,i,m;l f(l n){n+=m;return 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,x-=u,y-=v,i++<4;x=s,s=-v,v=u,u=-t,t=x)x<0&y<0?q+=f(1)-f(x)-f(y)+f(x+y-1):0;i=!printf("%lld",q);}
FF256grhy