結果
| 問題 | No.325 マンハッタン距離2 |
| コンテスト | |
| ユーザー |
FF256grhy
|
| 提出日時 | 2015-12-22 14:25:52 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 268 bytes |
| 記録 | |
| コンパイル時間 | 121 ms |
| コンパイル使用メモリ | 30,404 KB |
| 最終ジャッジ日時 | 2026-02-23 20:15:22 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 4 WA * 20 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:1:80: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
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:251: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
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:251: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
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);}
FF256grhy