{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":" \n \u003cp\u003e\u003cem\u003e80 Days is an interesting game based on Jules Verne\u0027s science fiction \"Around the World in Eighty Days\".\u003c/em\u003e In this game, you have to manage the limited money and time.\u003c/p\u003e \n \u003cp\u003eNow we simplified the game as below:\u003c/p\u003e \n \u003cp\u003eThere are \u003cvar\u003en\u003c/var\u003e cities on a circle around the world which are numbered from 1 to \u003cvar\u003en\u003c/var\u003e by their order on the circle. When you reach the city \u003cvar\u003ei\u003c/var\u003e at the first time, you will get \u003cvar\u003ea\u003csub\u003ei\u003c/sub\u003e\u003c/var\u003e dollars (\u003cvar\u003ea\u003csub\u003ei\u003c/sub\u003e\u003c/var\u003e can even be negative), and if you want to go to the next city on the circle, you should pay \u003cvar\u003eb\u003csub\u003ei\u003c/sub\u003e\u003c/var\u003e dollars. At the beginning you have \u003cvar\u003ec\u003c/var\u003e dollars.\u003c/p\u003e \n \u003cp\u003eThe goal of this game is to choose a city as start point, then go along the circle and visit all the city once, and finally return to the start point. During the trip, the money you have must be no less than zero.\u003c/p\u003e \n \u003cp\u003eHere comes a question: to complete the trip, which city will you choose to be the start city? \u003c/p\u003e \n \u003cp\u003eIf there are multiple answers, please output the one with the smallest number.\u003c/p\u003e \n "}},{"title":"Input","value":{"format":"HTML","content":" \n \u003cp\u003eThe first line of the input is an integer \u003cvar\u003eT\u003c/var\u003e (\u003cvar\u003eT\u003c/var\u003e ≤ 100), the number of test cases.\u003c/p\u003e \n \u003cp\u003eFor each test case, the first line contains two integers \u003cvar\u003en\u003c/var\u003e and \u003cvar\u003ec\u003c/var\u003e (1 ≤\u003cvar\u003e n\u003c/var\u003e ≤ 10\u003csup\u003e6\u003c/sup\u003e, 0 ≤\u003cvar\u003e c \u003c/var\u003e≤ 10\u003csup\u003e9\u003c/sup\u003e). The second line contains \u003cvar\u003en\u003c/var\u003e integers \u003cvar\u003ea\u003csub\u003e1\u003c/sub\u003e, …, a\u003csub\u003en\u003c/sub\u003e\u003c/var\u003e \u0026nbsp;(-10\u003csup\u003e9 \u003c/sup\u003e≤ \u003cvar\u003ea\u003csub\u003ei \u003c/sub\u003e\u003c/var\u003e≤ 10\u003csup\u003e9\u003c/sup\u003e), and the third line contains \u003cvar\u003en\u003c/var\u003e integers \u003cvar\u003eb\u003csub\u003e1\u003c/sub\u003e, …, b\u003csub\u003en\u003c/sub\u003e\u003c/var\u003e (0 ≤\u003cvar\u003e b\u003csub\u003ei \u003c/sub\u003e\u003c/var\u003e≤ 10\u003csup\u003e9\u003c/sup\u003e).\u003c/p\u003e \n \u003cp\u003eIt\u0027s guaranteed that the sum of \u003cvar\u003en\u003c/var\u003e of all test cases is less than 10\u003csup\u003e6\u003c/sup\u003e\u003c/p\u003e \n "}},{"title":"Output","value":{"format":"HTML","content":" \n \u003cp\u003eFor each test case, output the start city you should choose.\u003c/p\u003e \n "}},{"title":"Sample Input","value":{"format":"HTML","content":" \n \u003cpre\u003e2\r\n3 0\r\n3 4 5\r\n5 4 3\r\n3 100\r\n-3 -4 -5\r\n30 40 50\u003c/pre\u003e \n "}},{"title":"Sample Output","value":{"format":"HTML","content":" \n \u003cpre\u003e2\r\n-1\u003c/pre\u003e \n "}},{"title":"Hint","value":{"format":"HTML","content":" \n \u003cp\u003eFor test case 1, both city 2 and 3 could be chosen as start point, 2 has smaller number. But if you start at city 1, you can\u0027t go anywhere.\u003c/p\u003e \n \u003cp\u003eFor test case 2, start from which city seems doesn\u0027t matter, you just don\u0027t have enough money to complete a trip.\u003c/p\u003e \n \u003c/div\u003e \n "}}]}