結果
問題 | No.553 AlphaCoder Rating |
ユーザー | Lapinpon |
提出日時 | 2017-08-11 23:13:55 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,500 ms |
コード長 | 566 bytes |
コンパイル時間 | 534 ms |
コンパイル使用メモリ | 60,376 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 21:47:53 |
合計ジャッジ時間 | 1,129 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 |
ソースコード
#include <iostream> #include <cmath> using namespace std; double g(double X){return pow(2.0,X/800);} double g1(double X){return 800*log(X)/log(2);} int main(){ int n; double Fn,fn,F1=1,Finf=0.229416; cin>>n; double tmp1=0,tmp2=0; for(int i=1;i<=n;i++){ tmp1+=pow(0.81,(double) i); tmp2+=pow(0.9,(double) i); } Fn=sqrt(tmp1)/tmp2; fn=(Fn-Finf)*1200/(F1-Finf); double X,RP,g_1; tmp1=tmp2=0; for(int i=1;i<=n;i++){ cin>>RP; tmp1+=g(RP)*pow(0.9,(double) i); tmp2+=pow(0.9,(double) i); } cout<<(int) (g1(tmp1/tmp2)-fn)<<endl; return 0; }