{"trustable":false,"sections":[{"title":"","value":{"format":"PLAIN","content":"Along a circular track, there are N gas stations, which are numbered clockwise from 1 up to N. At stationi, there are pi gallons of petrol available. To race from station i to its clockwise neighbor one need qi gallons of petrol. Consider a race where a car will start the race with an empty fuel tank. Your task is to find whether the car can complete the race from any of the stations or not. If it can then mention the smallest possible stationi from which the lap can be completed.\n\nInput\n\nFirst line of the input contains one integer T the number of test cases. Each test case will start with a line containing one integer N, which denotes the number of gas stations. In the next few lines contain 2N integers. First N integers denote the values of pis(petrol available at stationi), subsequent N integers denote the value of qis(amount of patrol needed to go to the next station in the clockwisedirection).\n\nOutput\nFor each test case, output the case number in the format \\Casec:\" , where c is the case number starting form 1. Then display whether it is possible to complete a lap by a car with an empty tank or not. If it is not possible to complete the lap then display \\Not possible\". If possible, then display \\Possible from station X\", where X is the first possible station from which the car can complete the lap.\n\nConstraints\n•T \u003c25\n•N \u003c100001\n\nSample Input\n\n2\n5\n1 1 1 1 1\n1 1 2 1 1\n7\n1 1 1 10 1 1 1\n2 2 2 2 2 2 2\n\nSample Output\nCase 1: Not possible\nCase 2: Possible from station 4\n\n"}},{"title":"","value":{"format":"PLAIN","content":"沿着一条环形跑道,有N个加油站,从1到N按顺时针方向编号,在第i站,有pi加仑的汽油。要从第i站到顺时针方向的邻站比赛,需要qi加仑的汽油。考虑到一场比赛,一辆汽车将以空油箱开始比赛。你的任务是找到汽车是否能从任何一个站完成比赛。如果可以,那么请说出可以完成比赛的最小可能的站点i。\n\n輸入資料\n\n输入的第一行包含一个整数T,表示测试用例的数量。每一个测试用例都会有一行包含一个整数N,表示加油站的数量。在接下来的几行中包含2N个整数。前N个整数表示pis(加油站的可用汽油)的值,后面的N个整数表示qis(顺时针方向到下一个加油站所需的巡逻量)的值。\n\n輸出\n对于每个测试用例,输出测试用例号,格式为\\Casec:\"。,其中c是以1开头的案例号。然后显示空油箱的车是否可以完成一圈。如果不可能跑完一圈,则显示 \\Not possible\"。如果可能,则显示 \\Possible from station X\",其中X是汽车可以完成圈的第一个可能的站点。\n\n限制条件\n-•T \u003c25\n-•N \u003c100001\n\n样品输入\n\n2\n5\n1 1 1 1 1\n1 1 2 1 1\n7\n1 1 1 10 1 1 1\n2 2 2 2 2 2 2\n\n采样输出\n案例1:不可能\n情况2:可能来自第4站\n\n"}}]}