結果
| 問題 |
No.5008 [Cherry Alpha] Discrete Pendulum with Air Resistance
|
| コンテスト | |
| ユーザー |
ks2m
|
| 提出日時 | 2022-10-14 23:22:06 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 100 ms / 2,000 ms |
| コード長 | 2,431 bytes |
| コンパイル時間 | 2,466 ms |
| 実行使用メモリ | 37,452 KB |
| スコア | 730,003,687,228,909 |
| 最終ジャッジ日時 | 2022-10-14 23:22:22 |
| 合計ジャッジ時間 | 15,238 ms |
|
ジャッジサーバーID (参考情報) |
judge13 / judge9 |
| 純コード判定しない問題か言語 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
static boolean batch = false;
static boolean readFile = false;
static int num = 0;
static int N, K;
static int[] t, u;
public static void main(String[] args) throws Exception {
if (batch) {
readFile = true;
}
if (readFile) {
if (batch) {
long tl = 2000; // TODO
long tw = (long) (tl * 0.9);
long total = 0;
int bidx = 0;
int best = 0;
int widx = 0;
int worst = 1000000000;
int re = 0;
int tle = 0;
for (int z = 0; z < 100; z++) {
try {
makeCase();
long st = System.currentTimeMillis();
int score = solve();
long time = System.currentTimeMillis() - st;
if (time > tw) {
System.out.println(z + ":\t" + score + "\t" + time + "ms");
if (time > tl) {
tle++;
}
} else {
System.out.println(z + ":\t" + score);
}
total += score;
if (score > best) {
best = score;
bidx = z;
}
if (score < worst) {
worst = score;
widx = z;
}
} catch (Exception e) {
System.out.println(z + ":\t" + e.getMessage());
re++;
}
}
System.out.println("total: " + total);
System.out.println("best: " + bidx + ": " + best);
System.out.println("worst: " + widx + ": " + worst);
System.out.println("RE: " + re);
System.out.println("TLE: " + tle);
} else {
makeCase();
int score = solve();
System.out.println(score);
}
} else {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
init(br);
solve();
}
}
static void makeCase() {
}
static void init(BufferedReader br) throws Exception {
String[] sa = br.readLine().split(" ");
N = Integer.parseInt(sa[0]);
K = Integer.parseInt(sa[1]);
sa = br.readLine().split(" ");
t = new int[K];
for (int i = 0; i < K; i++) {
t[i] = Integer.parseInt(sa[i]);
}
sa = br.readLine().split(" ");
u = new int[K];
for (int i = 0; i < K; i++) {
u[i] = Integer.parseInt(sa[i]);
}
}
static int solve() throws Exception {
int m = 9;
for (int i = 0; i < N; i++) {
int b = rand(m, m + 10);
int e = rand(5, 10);
System.out.println(b + " " + m + " " + e);
}
int score = 0;
return score;
}
static int rand(int l, int r) {
int d = r - l;
int ret = (int) (Math.random() * d);
return ret + l;
}
}
ks2m