Problem Statement: Recently Chef bought a bunch of robotwaiters. And now he needs to know how much to pay for the electricity that robots use for their work. All waiters serve food from the kitchen (which is in the point (0, 0)) and carry it to some table (which is in some point (x, y)) in a shortest way. But this is a beta version of robots and they can only do the next moves: turn right and make a step forward or turn left and make a step forward. Initially they look in direction of Xaxis. Your task is to calculate for each query the number of moves they’ll do to reach corresponding table. Input The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows. For each test case there is a sing line containing two spaceseparated integers  x and y. Output For each test case, output a single line containing number of moves that robot will make to reach point (x, y) Constraints 1 ≤ T ≤ 105 109 ≤ x, y ≤ 109 Example Input: 2 3 3 3 4 Output: 6 7 My Code {In JAVA} import java.util.Scanner; class Main {
} Please tell what is the problem in the code. Because in my IDE its working fine and giving correct output. But when I submit it on codechef its giving "WRONG ANSWER" as result. asked 13 Jul '14, 10:53

Please delete the post.Its an ongoing contest.Please do not discuss strategy, suggestions or tips in the forum during a live contest. answered 13 Jul '14, 12:09
