import java.util.Scanner; //小明喜欢打DOTA 问题32???? import java.lang.Math; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()){ int x = sc.nextInt(); int y = sc.nextInt(); int e[][] = new int[5][3]; for (int i = 0; i < e.length; i++) { for (int j = 0; j < e[i].length; j++) { e[i][j] = sc.nextInt(); } } for (int i = 0; i < 5; i++) { for (int j = 0; j < 5; j++) { if ((e[j][0] - x) * (e[i][1] - y) == (e[i][0] - x) * (e[j][1] - y)) { if (e[j][0] < e[i][0] || e[j][1] < e[i][1]) { e[i][0] = x; e[i][1] = y; } } } } int panduan = 0; int d = sc.nextInt(); double r = sc.nextDouble(); for (int i = 0; i < 5; i++) { double c = Math.sqrt((e[i][0] - x) * (e[i][0] - x) + (e[i][1] - y) * (e[i][1] - y)); if (c <= d) { if (r * c >= e[i][2]) { panduan = 1; } } } if (panduan == 1) { System.out.println("Yes"); } else { System.out.println("No"); } } } } /* Main.c:1:1: error: unknown type name 'import' import java.util.Scanner; //小明喜欢打DOTA 问题32???? ^ Main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token import java.util.Scanner; //小明喜欢打DOTA 问题32???? ^ Main.c:2:1: error: unknown type name 'import' import java.lang.Math; ^ Main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token import java.lang.Math; ^ Main.c:4:1: error: unknown type name 'public' public class Main { ^ Main.c:4:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main' public class Main { ^ */ |
Double click to view unformatted code.