結果
| 問題 | No.325 マンハッタン距離2 |
| コンテスト | |
| ユーザー |
FF256grhy
|
| 提出日時 | 2015-12-22 16:02:11 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 268 bytes |
| 記録 | |
| コンパイル時間 | 163 ms |
| コンパイル使用メモリ | 31,048 KB |
| 最終ジャッジ日時 | 2026-02-23 20:15:26 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:1:85: 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;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<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 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<1&y<1?q+=f(1)-f(x)-f(y)+f(x+y-1):0;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;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<1&y<1?q+=f(1)-f(x)-f(y)+f(x+y-1):0;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;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<1&y<1?q+=f(1)-f(x)-f(y)+f(x+y-1):0;i=!printf("%lld",q);}
FF256grhy