結果

問題 No.553 AlphaCoder Rating
ユーザー kaito_tateyamakaito_tateyama
提出日時 2017-08-14 10:09:13
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,500 ms
コード長 851 bytes
コンパイル時間 1,424 ms
コンパイル使用メモリ 162,952 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-21 11:15:55
合計ジャッジ時間 2,193 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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