結果

問題 No.553 AlphaCoder Rating
ユーザー LapinponLapinpon
提出日時 2017-08-11 23:13:55
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 1,500 ms
コード長 566 bytes
コンパイル時間 429 ms
コンパイル使用メモリ 59,408 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-02 23:36:42
合計ジャッジ時間 1,397 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <cmath>
using namespace std;
double g(double X){return pow(2.0,X/800);}
double g1(double X){return 800*log(X)/log(2);}
int main(){
	
	int n;
	double Fn,fn,F1=1,Finf=0.229416;
	
	cin>>n;
	double tmp1=0,tmp2=0;
	for(int i=1;i<=n;i++){
		tmp1+=pow(0.81,(double) i);
		tmp2+=pow(0.9,(double) i);
	}
	Fn=sqrt(tmp1)/tmp2;
	fn=(Fn-Finf)*1200/(F1-Finf);
	
	double X,RP,g_1;
	tmp1=tmp2=0;
	for(int i=1;i<=n;i++){
		cin>>RP;
		tmp1+=g(RP)*pow(0.9,(double) i);
		tmp2+=pow(0.9,(double) i);
	}
	cout<<(int) (g1(tmp1/tmp2)-fn)<<endl;
	
	return 0;
	
}
0