For 750B - New Year and North Pole, test case #4 reads as follows test case is as follows:
input
3
20000 South
10 East
20000 North
output
NO
Why is the output NO
? Starting off at the north pole, we march 20000
km south to reach the south pole. We then travel attempt to move 3
km east, but since we're at the south pole, we actually just spin around (?) and move nowhere because every direction is north. We then march 20000
km north and wind up back at the north pole. Hence the answer should be YES
.
What am I missing? It has to be the 10 East
line I'm misinterpreting, right?