結果
| 問題 |
No.553 AlphaCoder Rating
|
| ユーザー |
sugim48
|
| 提出日時 | 2017-08-11 22:45:49 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 27 ms / 1,500 ms |
| コード長 | 738 bytes |
| コンパイル時間 | 1,611 ms |
| コンパイル使用メモリ | 169,624 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-12 21:30:43 |
| 合計ジャッジ時間 | 2,929 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0; i < N; i++)
typedef long long ll;
const int MOD = 1e9 + 7;
const ll INF = LLONG_MAX / 2;
int main() {
int N; cin >> N;
vector<int> a(N);
rep(i, N) cin >> a[i];
vector<double> F(1000 + 1);
for (int n = 1; n <= 1000; n++) {
double x = 0, y = 0;
for (int i = 1; i <= n; i++)
x += pow(0.81, i), y += pow(0.9, i);
F[n] = sqrt(x) / y;
}
vector<double> f(N + 1);
for (int n = 1; n <= N; n++)
f[n] = (F[n] - F[1000]) / (F[1] - F[1000]) * 1200;
double x = 0, y = 0;
for (int i = 1; i <= N; i++) {
x += pow(2, a[i - 1] / 800.0) * pow(0.9, i);
y += pow(0.9, i);
}
double ans = log(x / y) / log(2) * 800 - f[N];
cout << (int)ans << endl;
}
sugim48