結果
| 問題 | No.553 AlphaCoder Rating |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-11 22:59:43 |
| 言語 | C90 (gcc 15.2.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 497 bytes |
| 記録 | |
| コンパイル時間 | 190 ms |
| コンパイル使用メモリ | 39,260 KB |
| 最終ジャッジ日時 | 2026-02-24 00:50:55 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 -- * 2 |
| other | -- * 12 |
コンパイルメッセージ
main.c: In function 'main':
main.c:23:13: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
23 | for(scanf("%d",&n);~scanf("%lf",x+i);i++);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #define double long double
main.c:28:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
28 | printf("%.lf\n",r);
| ^~~~~~
main.c:28:9: note: include '<stdio.h>' or provide a declaration of 'printf'
ソースコード
#define double long double
double F(n){
double a=0,b=0;int i=0;
for(;i++<n;)a+=powl(0.81,i),b+=powl(0.9,i);
return sqrtl(a)/b;
}
double Fi;
double f(n)
{
return (F(n)-Fi)/(F(1)-Fi)*12e2;
}
double g(double x){
return powl(2,x/800);
}
double iG(double x)
{
return 800*log2l(x);
}
main(n)
{
double x[150],r,G,H;
int i=0,j;
for(scanf("%d",&n);~scanf("%lf",x+i);i++);
j=G=H=0;
Fi=F(1e6);
for(;j++<n;)G+=g(x[j-1])*powl(0.9,j),H+=powl(0.9,j);
r=iG(G/H)-f(n);
printf("%.lf\n",r);
return 0;
}