結果
| 問題 | No.325 マンハッタン距離2 |
| コンテスト | |
| ユーザー |
FF256grhy
|
| 提出日時 | 2015-12-22 14:42:14 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 272 bytes |
| 記録 | |
| コンパイル時間 | 231 ms |
| コンパイル使用メモリ | 30,916 KB |
| 最終ジャッジ日時 | 2026-02-23 20:15:24 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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+1,x-=u+1,y-=v+1,i++<4;x=s,s=-v,v=u,u=-t,t=x)x<0&y<0?q+=f(0)-f(x)-f(y)+f(x+y):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+1,x-=u+1,y-=v+1,i++<4;x=s,s=-v,v=u,u=-t,t=x)x<0&y<0?q+=f(0)-f(x)-f(y)+f(x+y):0;i=!printf("%lld",q);}
main.c:1:255: 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+1,x-=u+1,y-=v+1,i++<4;x=s,s=-v,v=u,u=-t,t=x)x<0&y<0?q+=f(0)-f(x)-f(y)+f(x+y):0;i=!printf("%lld",q);}
| ^~~~~~
main.c:1:255: 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+1,x-=u+1,y-=v+1,i++<4;x=s,s=-v,v=u,u=-t,t=x)x<0&y<0?q+=f(0)-f(x)-f(y)+f(x+y):0;i=!printf("%lld",q);}
FF256grhy