SHTANU - Tanushera And His Car
Tanusera is a famous programmer. Recently he has bought a new car. He loves to play with problems, you know. So, he has decided to make a new problem. He has developed a software & installed it in his car. This software measures the distance passed by the car from time 1 to time N and shows the distance passed by it in every second. You'll be given the data which the software represents. After that Tanusera will ask you Q queries. In each query, he will give you time t1 and time t2. You have to calculate the distance passed by his car from t1 to t2.
Input starts with an integer , denoting the number of test cases. In each case, there will be two integers and where denotes the amount of times the software has been performed and denotes the number of queries. The next line will contain integers, th integer is the distance passed by the car in th time. Then there will be lines. In each line, there will be two integers and .
For each case, print the and the distance passed by the car from time to time for every query in single line. See the samples for further clarification.
Input:3 5 4 0 0 5 9 2 1 2 1 1 3 5 5 5 3 3 2 0 8 2 3 1 3 2 2 1 1 5 1 1 Output: Case 1: 0 0 16 2 Case 2: 8 10 0 Case 3: 5
[ Original setter of this problem is Risal Shahriar Shefin, RUET ]
I don't understand the motivation to lobby for demoting the problem to tutorial. The way SPOJ is currently organized, it's a cemetery of problems; barely anyone ever looks at these. Sometimes it just hurts when I dig up extremely useful and fun problem there that has like 20 solvers in 10 years. On the other hand, easy classicals get a lot of solvers and noone will fasttrack his rank through such problems in a long term. This problem is based on an important concept and is decently set allowing some experiments also in slower languages. Doesn't deserve to be shitcanned at least until the hierarchy/scoring system is updated IMHO.
Move it to tutorial, please.