結果
| 問題 | 
                            No.553 AlphaCoder Rating
                             | 
                    
| コンテスト | |
| ユーザー | 
                             takiteke
                         | 
                    
| 提出日時 | 2017-08-12 00:13:40 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,140 bytes | 
| コンパイル時間 | 613 ms | 
| コンパイル使用メモリ | 71,192 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-10-12 22:28:56 | 
| 合計ジャッジ時間 | 1,257 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 WA * 2 | 
| other | WA * 12 | 
ソースコード
#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<cstdio>
#include<string>
#include<algorithm>
#include<cmath>
using namespace std;
#define REP(i,n) for(int i=0;(i)<(n);(i)++)
double F(int n) {
	double ans = 0, sum = 0;
	for (int i = 1;i <= n;i++) {
		ans += pow(0.81, i);
		sum += pow(0.9, i);
	}
	ans = sqrt(ans) / sum;
	//cout << "sqrt " << ans << endl;
	return ans;
}
double f(int n) {
	double ans = 0;
	ans = F(n) * 1200;
	return ans;
}
double g(double X) {
	double ans;
	ans = pow(2, X / 800);
	return ans;
}
double g_inv(double R) {
	double ans;
	ans = 800 * log2(R);
	return ans;
}
double Rating(int n, int RPerf[]) {
	double ans = 0, sum = 0;
	for (int i = 1;i <= n;i++) {
		ans += g(RPerf[i-1]) * pow(0.9, i);
		sum += pow(0.9, i);
	}
	//cout << ans << " " << sum << endl;
	ans = ans / sum;
	//cout << ans << endl;
	ans = g_inv(ans) - f(n);
	//cout << ans << endl;
	return ans;
}
int main() {
	int N;
	int RPerf[102];
	cin >> N;
	REP(i, N) {
		cin >> RPerf[i];
	}
	int ans = Rating(N, RPerf);
	//cout << F(N) << endl << f(N) << endl << g(2000) << endl << g_inv(5.66) << endl;
	cout << ans << endl;
	return 0;
}
            
            
            
        
            
takiteke