結果

問題 No.132 点と平面との距離
ユーザー 👑 testestesttestestest
提出日時 2015-12-02 21:46:06
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 373 bytes
コンパイル時間 720 ms
コンパイル使用メモリ 22,016 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-14 08:03:38
合計ジャッジ時間 609 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 9 ms
5,376 KB
testcase_02 AC 32 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:37: warning: data definition has no type or storage class
    1 | double x[301],y[301],z[301],p,q,r,s;n,i,j;main(k){for(gets(&k);~scanf("%lf%lf%lf",x+n,y+n,z+n);n++);for(;++i<n;)for(j=i;++j<n;)for(k=j;++k<n;s+=fabs(p*(*x-x[i])+q*(*y-y[i])+r*(*z-z[i]))/sqrt(p*p+q*q+r*r))p=(y[j]-y[i])*(z[k]-z[i])-(z[j]-z[i])*(y[k]-y[i]),q=(z[j]-z[i])*(x[k]-x[i])-(x[j]-x[i])*(z[k]-z[i]),r=(x[j]-x[i])*(y[k]-y[i])-(y[j]-y[i])*(x[k]-x[i]);n=!printf("%f",s);}
      |                                     ^
main.c:1:37: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int]
main.c:1:39: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int]
    1 | double x[301],y[301],z[301],p,q,r,s;n,i,j;main(k){for(gets(&k);~scanf("%lf%lf%lf",x+n,y+n,z+n);n++);for(;++i<n;)for(j=i;++j<n;)for(k=j;++k<n;s+=fabs(p*(*x-x[i])+q*(*y-y[i])+r*(*z-z[i]))/sqrt(p*p+q*q+r*r))p=(y[j]-y[i])*(z[k]-z[i])-(z[j]-z[i])*(y[k]-y[i]),q=(z[j]-z[i])*(x[k]-x[i])-(x[j]-x[i])*(z[k]-z[i]),r=(x[j]-x[i])*(y[k]-y[i])-(y[j]-y[i])*(x[k]-x[i]);n=!printf("%f",s);}
      |                                       ^
main.c:1:41: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int]
    1 | double x[301],y[301],z[301],p,q,r,s;n,i,j;main(k){for(gets(&k);~scanf("%lf%lf%lf",x+n,y+n,z+n);n++);for(;++i<n;)for(j=i;++j<n;)for(k=j;++k<n;s+=fabs(p*(*x-x[i])+q*(*y-y[i])+r*(*z-z[i]))/sqrt(p*p+q*q+r*r))p=(y[j]-y[i])*(z[k]-z[i])-(z[j]-z[i])*(y[k]-y[i]),q=(z[j]-z[i])*(x[k]-x[i])-(x[j]-x[i])*(z[k]-z[i]),r=(x[j]-x[i])*(y[k]-y[i])-(y[j]-y[i])*(x[k]-x[i]);n=!printf("%f",s);}
      |                                         ^
main.c:1:43: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | double x[301],y[301],z[301],p,q,r,s;n,i,j;main(k){for(gets(&k);~scanf("%lf%lf%lf",x+n,y+n,z+n);n++);for(;++i<n;)for(j=i;++j<n;)for(k=j;++k<n;s+=fabs(p*(*x-x[i])+q*(*y-y[i])+r*(*z-z[i]))/sqrt(p*p+q*q+r*r))p=(y[j]-y[i])*(z[k]-z[i])-(z[j]-z[i])*(y[k]-y[i]),q=(z[j]-z[i])*(x[k]-x[i])-(x[j]-

ソースコード

diff #

double x[301],y[301],z[301],p,q,r,s;n,i,j;main(k){for(gets(&k);~scanf("%lf%lf%lf",x+n,y+n,z+n);n++);for(;++i<n;)for(j=i;++j<n;)for(k=j;++k<n;s+=fabs(p*(*x-x[i])+q*(*y-y[i])+r*(*z-z[i]))/sqrt(p*p+q*q+r*r))p=(y[j]-y[i])*(z[k]-z[i])-(z[j]-z[i])*(y[k]-y[i]),q=(z[j]-z[i])*(x[k]-x[i])-(x[j]-x[i])*(z[k]-z[i]),r=(x[j]-x[i])*(y[k]-y[i])-(y[j]-y[i])*(x[k]-x[i]);n=!printf("%f",s);}
0