結果

問題 No.553 AlphaCoder Rating
ユーザー autumn-eelautumn-eel
提出日時 2017-08-11 23:07:45
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 35 ms / 1,500 ms
コード長 592 bytes
コンパイル時間 1,804 ms
コンパイル使用メモリ 162,304 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-20 23:25:41
合計ジャッジ時間 2,673 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
5,248 KB
testcase_01 AC 32 ms
5,248 KB
testcase_02 AC 31 ms
5,376 KB
testcase_03 AC 32 ms
5,376 KB
testcase_04 AC 35 ms
5,376 KB
testcase_05 AC 34 ms
5,376 KB
testcase_06 AC 35 ms
5,376 KB
testcase_07 AC 33 ms
5,376 KB
testcase_08 AC 32 ms
5,376 KB
testcase_09 AC 32 ms
5,376 KB
testcase_10 AC 34 ms
5,376 KB
testcase_11 AC 33 ms
5,376 KB
testcase_12 AC 34 ms
5,376 KB
testcase_13 AC 32 ms
5,376 KB
testcase_14 AC 33 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;

double F(int n){
	double a=0,b=0;
	for(int i=1;i<=n;i++){
		a+=pow(0.81,i);
		b+=pow(0.9,i);
	}
	a=sqrt(a);
	return a/b;
}
double t;
double f(int n){
	double a=F(n)-t;
	double b=F(1)-t;
	return (a/b)*1200;
}
double g(double x){
	return pow(2.,x/800);
}
double ag(double x){
	return log2(x)*800;
}
int main() {
	t=F(1000000);
	int n;scanf("%d",&n);
	double a=0,b=0;
	for(int i=1;i<=n;i++){
		double p;scanf("%lf",&p);
		a+=g(p)*pow(0.9,i);
		b+=pow(0.9,i);
	}
	double G=ag(a/b);
	printf("%.0lf\n",G-f(n));
}
0