結果

問題 No.553 AlphaCoder Rating
ユーザー fal_rndfal_rnd
提出日時 2017-08-11 23:04:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 1,500 ms
コード長 1,083 bytes
コンパイル時間 2,176 ms
コンパイル使用メモリ 81,760 KB
実行使用メモリ 42,092 KB
最終ジャッジ日時 2024-04-20 23:23:47
合計ジャッジ時間 4,834 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
42,092 KB
testcase_01 AC 128 ms
41,628 KB
testcase_02 AC 115 ms
42,060 KB
testcase_03 AC 120 ms
42,012 KB
testcase_04 AC 129 ms
41,676 KB
testcase_05 AC 131 ms
41,796 KB
testcase_06 AC 130 ms
41,976 KB
testcase_07 AC 121 ms
41,496 KB
testcase_08 AC 136 ms
41,784 KB
testcase_09 AC 116 ms
42,048 KB
testcase_10 AC 137 ms
41,840 KB
testcase_11 AC 141 ms
41,808 KB
testcase_12 AC 129 ms
41,964 KB
testcase_13 AC 117 ms
42,080 KB
testcase_14 AC 125 ms
41,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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);
	}
}
0