結果

問題 No.553 AlphaCoder Rating
ユーザー gzlcpgzlcp
提出日時 2017-08-11 23:10:27
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,500 ms
コード長 1,038 bytes
コンパイル時間 782 ms
コンパイル使用メモリ 93,068 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-02 23:34:27
合計ジャッジ時間 1,825 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include<iostream>
#include<iomanip>
#include<math.h>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<string>
#include<complex>

#define INF (long long)1000000000
#define MOD 1000000007
#define EPS 1e-8

#define REP(i, m) for(long long i = 0; i < m; ++i)
#define FOR(i, n, m) for(long long i = n; i < m; ++i)
#define ALL(v) v.begin(), v.end()
#define pb push_back

using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef long double ld;

ld F(int n) {
	if(n==INF) {
		return sqrt(0.81/0.19)/(ld)9.0;
	} else {
		ld ue=0,st=0;
		ue=sqrt(0.81*(1.0-pow(0.81,n))/(ld)(1.0-0.81));
		st=0.9*(1.0-pow(0.9,n))/(ld)(1.0-0.9);
		return ue/st;
	}
}

ld f(int n) {
	return (F(n)-F(INF))/(F(1)-F(INF))*1200;
}

ld g(ld X) {
	return pow(2.0, X/(ld)800.0);
}

ld gi(ld X) {
	return 800.0*log2(X);
}

int main() {
	int n;
	cin>>n;
	ld ue=0;
	REP(i,n) {
		ld rp;
		cin>>rp;
		ue += g(rp)*pow(0.9,i+1);
	}
	ld st=0.9*(1-pow(0.9,n))/(1-0.9);
	cout<<round(gi(ue/st)-f(n))<<endl;
}
0