結果
| 問題 | No.325 マンハッタン距離2 |
| コンテスト | |
| ユーザー |
FF256grhy
|
| 提出日時 | 2015-12-27 02:08:43 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 262 bytes |
| 記録 | |
| コンパイル時間 | 122 ms |
| コンパイル使用メモリ | 30,412 KB |
| 最終ジャッジ日時 | 2026-02-23 20:20:40 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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 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:245: warning: incompatible implicit declaration of built-in function ‘printf’ [-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=-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:245: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
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);}
FF256grhy