FARIDA  Princess Farida
Once upon time there was a cute princess called Farida living in a castle with her father, mother and uncle. On the way to the castle there lived many monsters. Each one of them had some gold coins. Although they are monsters they will not hurt. Instead they will give you the gold coins, but if and only if you didn't take any coins from the monster directly before the current one. To marry princess Farida you have to pass all the monsters and collect as many coins as possible. Given the number of gold coins each monster has, calculate the maximum number of coins you can collect on your way to the castle.
Input
The first line of input contains the number of test cases. Each test case starts with a number N, the number of monsters, 0 <= N <= 10^4. The next line will have N numbers, number of coins each monster has, 0 <= The number of coins with each monster <= 10^9. Monsters described in the order they are encountered on the way to the castle.
Output
For each test case print “Case C: X” without quotes. C is the case number, starting with 1. X is the maximum number of coins you can collect.
Example
Input: 2 5 1 2 3 4 5 1 10 Output: Case 1: 9 Case 2: 10
hide comments
sabkx:
20211010 08:09:59
use long long instead of int 

dhrn75:
20210926 18:09:08
Wasted terrible time on this case > n == 0


aparnaphoebe:
20210830 21:49:57
Exactly same as : https://leetcode.com/problems/houserobber/ 

sal_vat_ion:
20210712 20:05:27
stupid n == 0 case. 

vrintle:
20210623 18:21:47
WTF? what does the problem wants to say? am I that dumb that I can't even get it, let alone solvering :')


aggarwal1443:
20210616 16:24:08
Come on guys u can do it just push your limit day by day :) 

csd_123:
20210616 06:32:25
my 50th 

voldemort_11:
20210612 22:58:46
Don't get too confused , it's easy :) 

loser_404:
20210609 10:20:46
I'm a loser indeed Last edit: 20210609 15:53:57 

null12_21:
20210527 20:09:59
just try and don't be a fag like me Last edit: 20210527 23:43:53 
Added by:  hossamyosef 
Date:  20130513 
Time limit:  1.237s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  FCIS/ASU Local Contest 2013 