結果

問題 No.553 AlphaCoder Rating
ユーザー kaito_tateyamakaito_tateyama
提出日時 2017-08-11 23:47:36
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,500 ms
コード長 876 bytes
コンパイル時間 705 ms
コンパイル使用メモリ 76,620 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-03 00:00:36
合計ジャッジ時間 1,696 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
#include <stdio.h>
#include <math.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){
  double a = (800 * log(x)) / log(2);
  return a;
}//うまくいってる

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 + 1<< "\n";

  return 0;
}
0