結果

問題 No.553 AlphaCoder Rating
ユーザー 9071tomato9071tomato
提出日時 2017-08-11 23:55:37
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,500 ms
コード長 1,164 bytes
コンパイル時間 679 ms
コンパイル使用メモリ 81,600 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-03 00:05:42
合計ジャッジ時間 1,673 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include<iostream>
#include <list>
#include<stack>
#include<queue>
#include <vector>
#include <set>
#include <map>
#include<algorithm>
#include<math.h>
#include<stdlib.h>
#include<string.h>
#include"time.h"
using namespace std;

#define FOR(k,m,n) for(int (k)=(m);(k)<(n);(k)++)
#define REP(i,n) FOR((i),0,(n))
#define LL long long
#define CLR(a) memset((a),0,sizeof(a))
#define SZ(x) (int((x).size()))
#define dump(x)  cerr << #x << " = " << (x) << endl

//ςꏊ
#define N_MAX 200


//蕶̂Ƃ

double F(int n) {
	double up = 0.81*(1 - pow(0.81, n)) / 0.19;
	up=sqrt(up);
	double down = 0.9*(1 - pow(0.9, n)) / 0.1;
	return up/down;
}
double f(int n) {
	double up=F(n)-(sqrt(0.81/0.19)/(0.9/0.1));
	double down=F(1) - (sqrt(0.81/0.19) / (0.9/0.1));
	return 1200*up/down;
}
double g(double X) {
	return pow(2.0,X/800);
}


int N;
int temp;

int main() {
	//g^-1̒gvZ	
	cin>>N;
	double X=0;
	FOR(i,1, N+1) {
		cin>>temp;
		X+=g(temp)*pow(0.9,i);
	}
	X/=(0.9*(1-pow(0.9,N))/0.1);

	//g^-1̒lvZ
	double ans=800*log2(X);
	ans-=f(N);
	printf("%.0f",ans);
	//cin>>N;

	return 0;
}
0