結果

問題 No.1944 ∞
ユーザー ks2mks2m
提出日時 2022-05-21 00:12:58
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 908 bytes
コンパイル時間 4,147 ms
コンパイル使用メモリ 77,460 KB
実行使用メモリ 68,284 KB
最終ジャッジ日時 2023-10-20 15:07:17
合計ジャッジ時間 9,021 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
53,532 KB
testcase_01 AC 53 ms
52,436 KB
testcase_02 AC 56 ms
53,540 KB
testcase_03 AC 55 ms
53,536 KB
testcase_04 AC 55 ms
52,456 KB
testcase_05 AC 55 ms
53,528 KB
testcase_06 AC 54 ms
53,532 KB
testcase_07 AC 55 ms
53,540 KB
testcase_08 AC 55 ms
52,436 KB
testcase_09 AC 53 ms
50,416 KB
testcase_10 AC 52 ms
52,476 KB
testcase_11 AC 55 ms
53,536 KB
testcase_12 AC 54 ms
53,536 KB
testcase_13 AC 54 ms
53,540 KB
testcase_14 AC 55 ms
53,544 KB
testcase_15 AC 323 ms
68,284 KB
testcase_16 AC 114 ms
55,516 KB
testcase_17 WA -
testcase_18 AC 96 ms
55,432 KB
testcase_19 AC 68 ms
54,380 KB
testcase_20 AC 90 ms
55,164 KB
testcase_21 AC 97 ms
55,284 KB
testcase_22 AC 92 ms
54,808 KB
testcase_23 AC 74 ms
54,436 KB
testcase_24 AC 79 ms
52,780 KB
testcase_25 AC 103 ms
53,456 KB
testcase_26 AC 102 ms
55,304 KB
testcase_27 AC 99 ms
55,448 KB
testcase_28 AC 94 ms
55,072 KB
testcase_29 AC 63 ms
54,392 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 224 ms
67,460 KB
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] sa = br.readLine().split(" ");
		int n = Integer.parseInt(sa[0]);
		long x = Integer.parseInt(sa[1]);
		long y = Integer.parseInt(sa[2]);
		sa = br.readLine().split(" ");
		int[] r = new int[n];
		for (int i = 0; i < n; i++) {
			r[i] = Integer.parseInt(sa[i]);
		}
		br.close();

		long z = x * x + y * y;
		if (n == 1) {
			long r2 = (long) r[0] * r[0];
			if (r2 == z) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		} else {
			long s = 0;
			for (int i = 0; i < n; i++) {
				s += r[i];
			}
			s *= 2;

			if (s > Integer.MAX_VALUE || s * s >= z) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		}
	}
}
0