結果
問題 | No.553 AlphaCoder Rating |
ユーザー |
|
提出日時 | 2019-08-29 17:03:38 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,500 ms |
コード長 | 649 bytes |
コンパイル時間 | 1,908 ms |
コンパイル使用メモリ | 193,548 KB |
最終ジャッジ日時 | 2025-01-07 15:33:57 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;double F(int n) {double nu=sqrt(0.81*(1-pow(0.81,n))/0.19);double de=0.9*(1-pow(0.9,n))/0.1;return nu/de;}double f(int n) {double Finf=sqrt(0.81/0.19)/9;return (F(n)-Finf)/(F(1)-Finf)*1200;}double g(int x) {return pow(2.0,x/800.0);}double rg(double x) {return 800*log2(x);}int main() {int n;cin>>n;int rp[n];for (int i=0;i<n;i++)cin>>rp[i];double nu=0;for (int i=0;i<n;i++)nu+=g(rp[i])*pow(0.9,i+1);double de=0.9*(1-pow(0.9,n))/0.1;cout<<rg(nu/de)-f(n)<<endl;return 0;}