WKTPoligon
You are given a polygon in the following (well known) text format (WKT): POLYGON ((x1 y1, x2 y2, x3 y3, ... , xN yN)), where x1 y1 and xN yN are equal (represent the same point), and N>3. You have to determine if that polygon could represent a geographical object in lat-lon coordinates. Lat coordinate represents the latitude from the interval [-90..90], and lon coordinate represents the longitude from the interval [-180..180]. The question is whether the given text can represent a geographical object. The condition is that the one of the coordinates represents the latitude (-90..90), and the other ones represent longitude (-180..180). Because the standard is not specific, we can have that x coordinates represent latitude, and y longitude, or vice-verse. In all the inputs the all the x coordinates will always represent either latitude or longitude.
POLYGON ((0 120, 0 -120, 0 0, 0 120))Output:
DAPOLYGON((123.44 22.2, 12.24 98.11, 12.26 99, 123.44 22.23, 123.45 22.2))Output:
NESubmit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.