結果
| 問題 |
No.553 AlphaCoder Rating
|
| ユーザー |
fal_rnd
|
| 提出日時 | 2017-08-11 23:04:25 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 143 ms / 1,500 ms |
| コード長 | 1,083 bytes |
| コンパイル時間 | 2,298 ms |
| コンパイル使用メモリ | 82,160 KB |
| 実行使用メモリ | 41,936 KB |
| 最終ジャッジ日時 | 2024-10-12 21:42:59 |
| 合計ジャッジ時間 | 5,193 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
import java.util.Scanner;
import java.util.stream.IntStream;
public class Main{
static IntStream REPS(int v){return IntStream.range(0,v);}
static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);}
static IntStream INS(int n) {return REPS(n).map(i->getInt());}
static Scanner s=new Scanner(System.in);
static int getInt(){return Integer.parseInt(s.next());}
static final double finf=0.22941573387056172;
public static void main(String[]$){
int n=getInt(),perf[]=INS(n).toArray();
System.out.println(
(int)(gin(
REPS(1,n).mapToDouble(i->g(perf[i-1])*Math.pow(0.9,i))
.sum()
/REPS(1,n).mapToDouble(i->Math.pow(0.9,i)).sum()
)
-f(n))
);
}
private static double F(int n){
return Math.sqrt(REPS(1,n).mapToDouble(i->Math.pow(0.81,i)).sum())
/REPS(1,n).mapToDouble(i->Math.pow(0.9,i)).sum();
}
private static double f(int n){
return (F(n)-finf)/(F(1)-finf)*1200;
}
private static double g(double n){
return Math.pow(2,n/800.0);
}
private static double gin(double n){
return 800*Math.log10(n)/Math.log10(2);
}
}
fal_rnd