結果
| 問題 |
No.475 最終日 - Writerの怠慢
|
| コンテスト | |
| ユーザー |
tanzaku
|
| 提出日時 | 2016-12-25 00:14:13 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,062 bytes |
| コンパイル時間 | 3,824 ms |
| コンパイル使用メモリ | 78,608 KB |
| 実行使用メモリ | 61,400 KB |
| 最終ジャッジ日時 | 2024-12-14 18:48:07 |
| 合計ジャッジ時間 | 11,929 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 10 |
ソースコード
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class _475 {
public static void main(String[] args) throws IOException {
new _475().solve();
}
void solve() throws IOException {
try (final Scanner in = new Scanner(System.in)) {
int n = in.nextInt();
long S = in.nextInt();
int wid = in.nextInt();
long[] a = new long[n];
for (int i = 0; i < n; i++) {
a[i] = in.nextInt();
}
a[wid] += 100 * S;
double ans = 1;
for (int i = 0; i < n; i++) if (i != wid) {
int low = 0, high = n;
while (high - low > 1) {
int mid = (low + high) / 2;
long x = a[i] + (long)(50 * S + 50 * S / (0.8 + 0.2 * mid));
if (x > a[wid]) {
low = mid;
} else {
high = mid;
}
}
double p = 1 - low / (n - 1.0);
ans *= p;
// dump(i, low, p);
}
System.out.printf("%.10f\n", ans);
}
}
// for debug
static void dump(Object... o) {
System.err.println(Arrays.deepToString(o));
}
}
tanzaku