結果

問題 No.553 AlphaCoder Rating
ユーザー kaito_tateyama
提出日時 2017-08-14 10:09:13
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,500 ms
コード長 851 bytes
コンパイル時間 1,352 ms
コンパイル使用メモリ 166,944 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-13 09:55:33
合計ジャッジ時間 2,064 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
#include <bits/stdc++.h>
using namespace std;

double F(int n){
  double a = pow(100, n) - pow(81, n);
  double b = pow(10, n) - pow(9, n);
  double c = sqrt(a) / (sqrt(19) * b);
  return c;
}

double f(int n){
  double a = F(n) - (1 / sqrt(19));
  double b = 1 - (1 / sqrt(19));
  double c = (1200 * a) / b;
  return c;
}
double g(double x){
  double a = pow(2,(double)(x / 800));
  return a;
}

double g1(double x){
  return (long double)800.0 * log2(x);
}//うまくいってる

int main(){

  //cout << g(2000);
  int n; cin >> n;
  double sum = 0;
  for (int i = 1; i <= n; i++) {
    int a; cin >> a;
    sum += pow(0.9, i) * g(a);
  }
  double m = sum / (9 * (1-pow(0.9, n)));
  int rating = g1(m) - f(n);
  cout << rating<< "\n";

  return 0;
}

0