結果

問題 No.553 AlphaCoder Rating
ユーザー pekempeypekempey
提出日時 2017-08-11 23:38:20
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,500 ms
コード長 548 bytes
コンパイル時間 755 ms
コンパイル使用メモリ 92,636 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-20 23:48:08
合計ジャッジ時間 1,376 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>

using namespace std;

double P(double x, int n) {
  return (1 - pow(x, n)) / (1 - x) * 0.9;
}

double F(int n) {
  return sqrt(P(0.81, n)) / P(0.9, n);
}

double f(int n) {
  return (F(n) - F(1000)) / (F(1) - F(1000)) * 1200;
}

int main() {
  int n;
  cin >> n;
  double ans = 0;
  for (int i = 1; i <= n; i++) {
    double r;
    cin >> r;
    ans += pow(2, r / 800) * pow(0.9, i);
  }
  ans /= P(0.9, n);
  ans = 800 * log2(ans) - f(n);

  cout << int(ans) << endl;
}
0