結果
問題 | No.553 AlphaCoder Rating |
ユーザー | nenuon |
提出日時 | 2017-08-12 00:09:34 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,500 ms |
コード長 | 926 bytes |
コンパイル時間 | 782 ms |
コンパイル使用メモリ | 83,316 KB |
実行使用メモリ | 4,384 KB |
最終ジャッジ日時 | 2023-08-03 00:17:52 |
合計ジャッジ時間 | 1,832 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,376 KB |
testcase_02 | AC | 1 ms
4,384 KB |
testcase_03 | AC | 1 ms
4,376 KB |
testcase_04 | AC | 1 ms
4,380 KB |
testcase_05 | AC | 1 ms
4,376 KB |
testcase_06 | AC | 2 ms
4,380 KB |
testcase_07 | AC | 2 ms
4,376 KB |
testcase_08 | AC | 1 ms
4,380 KB |
testcase_09 | AC | 1 ms
4,380 KB |
testcase_10 | AC | 2 ms
4,376 KB |
testcase_11 | AC | 2 ms
4,380 KB |
testcase_12 | AC | 1 ms
4,376 KB |
testcase_13 | AC | 1 ms
4,380 KB |
testcase_14 | AC | 1 ms
4,384 KB |
コンパイルメッセージ
main.cpp: 関数 ‘int main()’ 内: main.cpp:26:10: 警告: ‘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; }