結果

問題 No.553 AlphaCoder Rating
コンテスト
ユーザー ryoissy
提出日時 2017-08-11 23:23:34
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 1,500 ms
コード長 789 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 881 ms
コンパイル使用メモリ 174,472 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-30 01:53:14
合計ジャッジ時間 1,815 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int,int> P;

int n;
int rpref[101];

int main(void){
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d",&rpref[i]);
	}
	double l=0;
	double r=0;
	for(int i=1;i<=n;i++){
		l+=pow(2.0,(double)rpref[i-1]/800.0)*pow(0.9,(double)i);
		r+=pow(0.9,double(i));
		//printf("%.5f %.5f\n",l,r);
	}
	double gr=800.0*log2(l/r);
	double l2=0.0;
	for(int i=1;i<=n;i++){
		l2+=pow(0.81,(double)i);
	}
	double Fn=sqrt(l2)/r;
	l=0.0;
	r=0.0;
	for(int i=1;i<=1000;i++){
		l+=pow(0.81,(double)i);
		r+=pow(0.9,(double)i);
		//if(i<=50)printf("%.5f %.5f\n",l,r);
	}
	double Fp=sqrt(l)/r;
	double fn=(Fn-Fp)/(1.0-Fp)*1200.0;
	//printf("%.5f %.5f\n",gr,Fp);
	printf("%d\n",(int)(gr-fn+0.5));
	return 0;
}
0