Hi guys!! Again, really need your help !!!
I am solving this puzzle: http://i056.radikal.ru/1509/4e/391ff8e79aec.png
Here is an example:
Sample Input
1
3
1 3 4 3
6 7 6 3
4 6 7 6
Sample Output
16
Here's my solution: http://pastebin.ubuntu.com/12589123/ but it is wrong (((((
Help pozhalusta find counterexamples, the atoms in a rocking chair, I'm late but want solve ((((((