Little Liu has a plantation where he grows
The first line contains an integer
Then
A single integer, denoting the maximum amount of money Little Liu can earn.
5
1 3 4
2 4 5
1 1 2
3 3 1
2 3 3
14
For 40% testcases:
For all testcases:
Little Liu has a plantation where he grows
The first line contains an integer
Then
A single integer, denoting the maximum amount of money Little Liu can earn.
5
1 3 4
2 4 5
1 1 2
3 3 1
2 3 3
14
For 40% testcases:
For all testcases: