結果

問題 No.553 AlphaCoder Rating
ユーザー treeonetreeone
提出日時 2017-08-12 01:51:23
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 26 ms / 1,500 ms
コード長 831 bytes
コンパイル時間 1,320 ms
コンパイル使用メモリ 162,320 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-21 00:34:25
合計ジャッジ時間 2,433 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
using namespace std;
typedef pair<int, int> P;


signed main(){
	int n;
	cin >> n;
	vector<double> perf(n + 1), F(1100), f(1100);
	rep(i, 1, n + 1){
		cin >> perf[i];
	}
	rep(i, 1, 1010){
		double a = 0.0, b = 0.0;
		for(int j = 1; j <= i; j++){
			a += pow(0.81, j);
			b += pow(0.9, j);
		}
		F[i] = sqrt(a) / b;
	}
	rep(i, 1, 1010){
		f[i] = (F[i] - F[1000]) / (F[1] - F[1000]) * 1200.0;
	}
	rep(i, 1, 10){
		// cout << i << " " << F[i] << " " << f[i] << endl;
	}
	double a = 0.0, b = 0.0;
	for(int i = 1; i <= n; i++){
		a += pow(2.0, perf[i] / 800.0) * pow(0.9, i);
		b += pow(0.9, i);
	}
	double ans = log(a / b) / log(2.0) * 800.0 - f[n];
	cout << (int)ans << endl;
}
0