0_0_33337480_29040.cpp:15:9: error: stray '@' in program
@Override
^
0_0_33337480_29040.cpp:1:1: error: 'import' does not name a type
import java.util.ArrayList;
^
0_0_33337480_29040.cpp:2:1: error: 'import' does not name a type
import java.util.List;
^
0_0_33337480_29040.cpp:3:1: error: 'import' does not name a type
import java.util.Scanner;
^
0_0_33337480_29040.cpp:8:16: error: expected ':' before 'Point'
public Point(double x, double y) {
^
0_0_33337480_29040.cpp:12:16: error: expected ':' before 'double'
public double x;
^
0_0_33337480_29040.cpp:13:16: error: expected ':' before 'double'
public double y;
^
0_0_33337480_29040.cpp:15:10: error: 'Override' does not name a type
@Override
^
0_0_33337480_29040.cpp:19:5: error: expected ';' after class definition
}
^
0_0_33337480_29040.cpp:19:5: error: a storage class can only be specified for objects and functions
0_0_33337480_29040.cpp:21:12: error: expected ':' before 'static'
public static void main(String args[]) {
^
0_0_33337480_29040.cpp:21:29: error: 'String' has not been declared
public static void main(String args[]) {
^
0_0_33337480_29040.cpp:35:13: error: expected ':' before 'static'
private static double shortest(List<Point> pointList) {
^
0_0_33337480_29040.cpp:35:36: error: 'List' has not been declared
private static double shortest(List<Point> pointList) {
^
0_0_33337480_29040.cpp:35:40: error: expected ',' or '...' before '<' token
private static double shortest(List<Point> pointList) {
^
0_0_33337480_29040.cpp:44:13: error: expected ':' before 'static'
private static double shortest(List<Point> pointList, int begin, int end) {
^
0_0_33337480_29040.cpp:44:36: error: 'List' has not been declared
private static double shortest(List<Point> pointList, int begin, int end) {
^
0_0_33337480_29040.cpp:44:40: error: expected ',' or '...' before '<' token
private static double shortest(List<Point> pointList, int begin, int end) {
^
0_0_33337480_29040.cpp:44:27: error: 'static double Main::shortest(int)' cannot be overloaded
private static double shortest(List<Point> pointList, int begin, int end) {
^
0_0_33337480_29040.cpp:35:27: error: with 'static double Main::shortest(int)'
private static double shortest(List<Point> pointList) {
^
0_0_33337480_29040.cpp:58:13: error: expected ':' before 'static'
private static double distance(Point left, Point right) {
^
0_0_33337480_29040.cpp:62:13: error: expected ':' before 'static'
private static double getExternalS(List<Point> pointList, int begin, int end, double internalS) {
^
0_0_33337480_29040.cpp:62:40: error: 'List' has not been declared
private static double getExternalS(List<Point> pointList, int begin, int end, double internalS) {
^
0_0_33337480_29040.cpp:62:44: error: expected ',' or '...' before '<' token
private static double getExternalS(List<Point> pointList, int begin, int end, double internalS) {
^
0_0_33337480_29040.cpp:75:1: error: expected ';' after class definition
}
^
0_0_33337480_29040.cpp: In constructor 'Main::Point::Point(double, double)':
0_0_33337480_29040.cpp:9:18: error: request for member 'x' in '(Main::Point*)this', which is of pointer type 'Main::Point*' (maybe you meant to use '->' ?)
this.x = x;
^
0_0_33337480_29040.cpp:10:18: error: request for member 'y' in '(Main::Point*)this', which is of pointer type 'Main::Point*' (maybe you meant to use '->' ?)
this.y = y;
^
0_0_33337480_29040.cpp: In static member function 'static void Main::main(int*)':
0_0_33337480_29040.cpp:22:9: error: 'Scanner' was not declared in this scope
Scanner scanner = new Scanner(System.in);
^
0_0_33337480_29040.cpp:24:20: error: 'scanner' was not declared in this scope
while((n = scanner.nextInt()) != 0) {
^
0_0_33337480_29040.cpp:25:13: error: 'List' was not declared in this scope
List<Point> pointList = new ArrayList<>();
^
0_0_33337480_29040.cpp:25:23: error: expected primary-expression before '>' token
List<Point> pointList = new ArrayList<>();
^
0_0_33337480_29040.cpp:25:25: error: 'pointList' was not declared in this scope
List<Point> pointList = new ArrayList<>();
^
0_0_33337480_29040.cpp:25:41: error: 'ArrayList' does not name a type
List<Point> pointList = new ArrayList<>();
^
0_0_33337480_29040.cpp:25:51: error: expected primary-expression before '>' token
List<Point> pointList = new ArrayList<>();
^
0_0_33337480_29040.cpp:25:53: error: expected primary-expression before ')' token
List<Point> pointList = new ArrayList<>();
^
0_0_33337480_29040.cpp:29:13: error: 'System' was not declared in this scope
System.out.println(String.format("%.2f", shortest(pointList) / 2));
^
0_0_33337480_29040.cpp:29:32: error: 'String' was not declared in this scope
System.out.println(String.format("%.2f", shortest(pointList) / 2));
^
0_0_33337480_29040.cpp: In static member function 'static double Main::shortest(int)':
0_0_33337480_29040.cpp:36:13: error: 'pointList' was not declared in this scope
if (pointList.size() <= 1) {
^
0_0_33337480_29040.cpp:39:9: error: 'pointList' was not declared in this scope
pointList.sort((a,b) -> Double.compare(a.x, b.x));
^
0_0_33337480_29040.cpp:39:25: error: 'a' was not declared in this scope
pointList.sort((a,b) -> Double.compare(a.x, b.x));
^
0_0_33337480_29040.cpp:39:27: error: 'b' was not declared in this scope
pointList.sort((a,b) -> Double.compare(a.x, b.x));
^
0_0_33337480_29040.cpp: In static member function 'static double Main::shortest(int)':
0_0_33337480_29040.cpp:45:13: error: 'end' was not declared in this scope
if (end - begin == 0) {
^
0_0_33337480_29040.cpp:45:19: error: 'begin' was not declared in this scope
if (end - begin == 0) {
^
0_0_33337480_29040.cpp:46:20: error: 'Double' was not declared in this scope
return Double.MAX_VALUE;
^
0_0_33337480_29040.cpp:48:13: error: 'end' was not declared in this scope
if (end - begin == 1) {
^
0_0_33337480_29040.cpp:48:19: error: 'begin' was not declared in this scope
if (end - begin == 1) {
^
0_0_33337480_29040.cpp:49:29: error: 'pointList' was not declared in this scope
return distance(pointList.get(begin), pointList.get(end));
^
0_0_33337480_29040.cpp:51:33: error: 'pointList' was not declared in this scope
double leftS = shortest(pointList, begin, (begin + end) / 2);
^
0_0_33337480_29040.cpp:51:44: error: 'begin' was not declared in this scope
double leftS = shortest(pointList, begin, (begin + end) / 2);
^
0_0_33337480_29040.cpp:51:60: error: 'end' was not declared in this scope
double leftS = shortest(pointList, begin, (begin + end) / 2);
^
0_0_33337480_29040.cpp:53:28: error: 'Math' was not declared in this scope
double internalS = Math.min(leftS, rightS);
^
0_0_33337480_29040.cpp: In static member function 'static double Main::distance(Main::Point, Main::Point)':
0_0_33337480_29040.cpp:59:16: error: 'Math' was not declared in this scope
return Math.sqrt(Math.pow(left.x - right.x, 2.0) + Math.pow(left.y - right.y, 2.0));
^
0_0_33337480_29040.cpp: In static member function 'static double Main::getExternalS(int)':
0_0_33337480_29040.cpp:63:20: error: 'begin' was not declared in this scope
int mid = (begin + end) / 2;
^
0_0_33337480_29040.cpp:63:28: error: 'end' was not declared in this scope
int mid = (begin + end) / 2;
^
0_0_33337480_29040.cpp:64:23: error: 'pointList' was not declared in this scope
double midX = pointList.get(mid).x;
^
0_0_33337480_29040.cpp:65:22: error: 'internalS' was not declared in this scope
double res = internalS;
^
0_0_33337480_29040.cpp:68:21: error: 'Math' was not declared in this scope
if (Math.abs(pointList.get(i).y - pointList.get(j).y) <= internalS) {
^
|