Here is the problem statement
http://www.spoj.com/problems/NSTEPS/
This task is full of stuff that need to be noticed. Suppose the give coordinates are X amd Y. First of all notice that the the number exists only when x==y or x==y+2. Then you need to check for one more thing. Notice that if x is an even number the answer is x+y else its x+y-1
http://www.spoj.com/problems/NSTEPS/
This task is full of stuff that need to be noticed. Suppose the give coordinates are X amd Y. First of all notice that the the number exists only when x==y or x==y+2. Then you need to check for one more thing. Notice that if x is an even number the answer is x+y else its x+y-1
No comments:
Post a Comment