結果
| 問題 |
No.553 AlphaCoder Rating
|
| ユーザー |
nenuon
|
| 提出日時 | 2017-08-12 00:09:34 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,500 ms |
| コード長 | 926 bytes |
| コンパイル時間 | 884 ms |
| コンパイル使用メモリ | 91,456 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-12 22:27:04 |
| 合計ジャッジ時間 | 1,558 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:26:10: warning: 'Fn' may be used uninitialized [-Wmaybe-uninitialized]
26 | double Fn, fn, f1, finf;
| ^~
ソースコード
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;
int main()
{
int N; cin >> N;
double r[N];
FOR(i,0,N) cin >> r[i];
double Fn, fn, f1, finf;
FOR(i,1,N+1) Fn += pow(0.81, i);
Fn = sqrt(Fn);
double tmp = 0;
FOR(i,1,N+1) tmp += pow(0.9, i);
Fn /= tmp;
f1 = sqrt(0.81) / 0.9;
finf = sqrt(0.81 / 0.19) / (0.9 / 0.1);
fn = (Fn - finf) / (f1 - finf) * 1200;
double ans = 0;
FOR(i,1,N+1) {
ans += pow(2, r[i-1] / 800.0) * pow(0.9, i);
}
ans /= tmp;
ans = 800 * log(ans) / log(2);
ans -= fn;
cout << int(ans) << endl;
return 0;
}
nenuon