Toggle navigation
NTHU Online Judge
Contest
Problem
Submit
Status
3
lawrence910426
Logout
11916 - Mario and Coins
Status
|
Limits
Submit
×
Close
Limits
Time
Memory
Case 1
1 sec
32 MB
Case 2
1 sec
32 MB
Case 3
1 sec
32 MB
Case 4
1 sec
32 MB
Case 5
1 sec
32 MB
Description
Please help Mario to find th max available number of coins
exactly
at the Nth step
Hint: Level-order traversal
Input
Output
Sample Input
Download
5 6 7 2 4 0 2 0 0 0 0 6 7 0 6 0 5 5 0 2 4 3 2 4 3 0 4 0 0 0 1 9 3 9 7 2 0 2 0 0 7 3 1 4 3 7 0 4 8 5 0 0 7 3 1 0 0 3 1 5 0 2 0 1 7 7 0 4 0 6 7 3 0 4 1 0 3 4 0 2 0 5 0 6 4 0 4 1 0 7 1 4 4 5 8 3 0 2 1 3 8 3 2 0 0 0 0 3 1 0 4 2 6 0 1 3 0 1 5 6 0 4 2 0 0 0 5 2 0 6 0 4 3 1 1 1 9 5 5 8 3 1 2 1 1 1 2 2 0 0 9 0 1 6 9 0 6 3 0 0 3 1 3 4 1 2 0 0 3 0 0 3 7 2 4 0 4 1 0 6 3 2 7 9 9 8 0 0 4 1 3 2 2 0 0 2 2 0 2 0 0 1 2 6 4 1 5 0 2 3 0 2 0 2 0 7 2 1 0 3 0 0 7 0 0 5 0 6 5 9 4 3 2 5 1 7 4 0 0 3 0 5 0 0 1 0 3 3 5 0 0 4 3 4 0 3 0 6 0 3 1 0 0 1 1 0 2 5 9
Sample Output
Download
7 7 3 6 4
Tags
Add Tag
Discuss