結果

問題 No.5008 [Cherry Alpha] Discrete Pendulum with Air Resistance
ユーザー ks2mks2m
提出日時 2022-10-14 23:22:06
言語 Java21
(openjdk 21)
結果
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
純コード判定しない問題か言語
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
35,856 KB
testcase_01 AC 83 ms
37,280 KB
testcase_02 AC 80 ms
35,816 KB
testcase_03 AC 76 ms
35,812 KB
testcase_04 AC 75 ms
35,788 KB
testcase_05 AC 75 ms
35,708 KB
testcase_06 AC 80 ms
37,452 KB
testcase_07 AC 78 ms
35,824 KB
testcase_08 AC 77 ms
35,792 KB
testcase_09 AC 77 ms
35,760 KB
testcase_10 AC 77 ms
35,604 KB
testcase_11 AC 77 ms
35,612 KB
testcase_12 AC 85 ms
35,784 KB
testcase_13 AC 77 ms
35,580 KB
testcase_14 AC 80 ms
35,636 KB
testcase_15 AC 78 ms
35,824 KB
testcase_16 AC 86 ms
37,176 KB
testcase_17 AC 99 ms
35,784 KB
testcase_18 AC 78 ms
35,560 KB
testcase_19 AC 77 ms
35,824 KB
testcase_20 AC 76 ms
35,724 KB
testcase_21 AC 77 ms
35,728 KB
testcase_22 AC 77 ms
35,740 KB
testcase_23 AC 99 ms
37,252 KB
testcase_24 AC 79 ms
36,108 KB
testcase_25 AC 79 ms
35,684 KB
testcase_26 AC 75 ms
35,704 KB
testcase_27 AC 73 ms
35,696 KB
testcase_28 AC 78 ms
35,708 KB
testcase_29 AC 94 ms
35,872 KB
testcase_30 AC 75 ms
35,612 KB
testcase_31 AC 76 ms
35,804 KB
testcase_32 AC 76 ms
35,616 KB
testcase_33 AC 75 ms
35,736 KB
testcase_34 AC 74 ms
35,624 KB
testcase_35 AC 89 ms
35,896 KB
testcase_36 AC 74 ms
35,764 KB
testcase_37 AC 76 ms
35,816 KB
testcase_38 AC 77 ms
35,696 KB
testcase_39 AC 95 ms
35,764 KB
testcase_40 AC 80 ms
35,760 KB
testcase_41 AC 76 ms
35,660 KB
testcase_42 AC 76 ms
35,628 KB
testcase_43 AC 76 ms
35,720 KB
testcase_44 AC 77 ms
35,808 KB
testcase_45 AC 80 ms
35,772 KB
testcase_46 AC 100 ms
35,900 KB
testcase_47 AC 85 ms
37,420 KB
testcase_48 AC 74 ms
35,684 KB
testcase_49 AC 75 ms
35,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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