結果

問題 No.202 1円玉投げ
ユーザー 37zigen37zigen
提出日時 2018-05-27 20:11:52
言語 Java21
(openjdk 21)
結果
TLE  
実行時間 -
コード長 742 bytes
コンパイル時間 3,518 ms
コンパイル使用メモリ 74,452 KB
実行使用メモリ 80,456 KB
最終ジャッジ日時 2023-08-23 23:36:14
合計ジャッジ時間 21,830 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4,985 ms
78,032 KB
testcase_01 TLE -
testcase_02 AC 120 ms
56,296 KB
testcase_03 AC 121 ms
56,088 KB
testcase_04 AC 124 ms
55,696 KB
testcase_05 AC 925 ms
65,908 KB
testcase_06 AC 4,564 ms
74,176 KB
testcase_07 TLE -
testcase_08 TLE -
testcase_09 AC 2,978 ms
70,548 KB
testcase_10 AC 1,549 ms
69,016 KB
testcase_11 AC 2,529 ms
69,668 KB
testcase_12 AC 2,491 ms
69,796 KB
testcase_13 AC 1,443 ms
69,156 KB
testcase_14 AC 768 ms
66,068 KB
testcase_15 AC 2,756 ms
68,400 KB
testcase_16 AC 4,513 ms
78,624 KB
testcase_17 TLE -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.HashSet;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		new Main().run();
	}

	void run() {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] X = new int[N];
		int[] Y = new int[N];
		HashSet<Long> set = new HashSet<>();
		loop1: for (int i = 0; i < N; ++i) {
			X[i] = sc.nextInt();
			Y[i] = sc.nextInt();
			for (int x = -20 + X[i]; x <= 20 + X[i]; ++x) {
				for (int y = -20 + Y[i]; y <= 20 + Y[i]; ++y) {
					if ((x - X[i]) * (x - X[i]) + (y - Y[i]) * (y - Y[i]) >= 400)
						continue;
					if (set.contains((long) x << 32 | y)) {
						continue loop1;
					}
				}
			}
			set.add((long) X[i] << 32 | Y[i]);
		}
		System.out.println(set.size());
	}
}
0