TurkZeka 2008 Puzzle Competition


Pictorial Puzzle

15145
2081855
19924
6152118
?
69225
202315

Optimization Puzzle

By starting from any cell of the diagram and moving only horizontally and uprightly, draw a line as long as you can.

THE RULES:

1) Specify your beginning direction with an arrow sign. To show your beginning cell, put a "S" letter into that cell.
2) While moving to a direction; You have to move until first blue barrier which is at that way.
3) If the barrier is a diagonal, then you have to move to the direction which is canalized by the barrier.
4) If the barrier is not a diagonal, then you can choose moving on to the left or the right direction.
5) You can pass over the cell twice that you passed over before. Namely, the way can intersect each other. But, You cannot pass over the same way twice.
6) In accordance with the fifth rule, when you have not the way to go or you reach your beginning cell, your line is over. Anymore, you have not chance to draw a second way.
 

INVALID SOLUTIONS
   

VALID SOLUTIONS
 

SCORE CALCULATION:
By starting from your beginning direction, sum up the "+" and "-" values in the cells where you pass over.
When your line intersect at the cell where you passed over before;
A) If there is not value in this cell, namely, it is an empty cell; go on without making anything.
B) If there is "-" value in this cell; firstly, add this "-" value to the score which you sum up until that time(this will decrease your score), then divide in two the new value of your score and go on to the way.
C) If there is "+" value in this cell; firstly, add this "+" value to the score which you sum up until that time(this will increase your score), then double the new value of your score and go on to the way.

Repeat same procedure at each intersection.

When your line encounter a barrier, if there is no way to any direction; your line is over with the last score which you sum up until that time.
But; Even if there is "-" or "+" value at the last cell of your line, this is not a intersection, so, don't add it to your score again.
If the cell where you have to finish your way is your beginning cell; double your score.
But; If there is "-" or "+" sign at your beginning cell; firstly, add that value to your score, then double the new value of your score. Namely, you will get bonus, if you can unit beginning and ending point of your line.

Analyse the example score calculations, carefully!
 

(-5+10+2+3+10)x2 = 40
(40+8-4-4)/2 = 20
(20+6+2)x2 = 56
(2+10-5-2-4-4)/2 = -1.5
(-1.5+6+2)x2x2 = 26
 
(2+6-4+6)x2 = 20
(20+8+8)x2 = 72
(72-5+10+2)x2x2 = 316
(8+6-4+6)x2 = 32
(32+2+2)x2 = 72
(72+10-5-2-4)/2 = 35.5
   
(8+6-4+6)x2 = 32
(32+2+2)x2 = 72
(72+10-5-2+8)x2 = 166