Task 56 Life is Simple

Back to Problem Solutions forum

Artyom Tsatinyan     2021-04-24 19:53:10
User avatar

I don't understand why my solution is wrong Please help me

My input data:

XX---XX  
-X-XXX-  
-----X  
XX-XX-X  
XXX-X-  

My answer: 18 12 10 11 12

Expected answer was: 19 18 20 20 26

My steps:

XX---XX  
-X-XXX-  
-----X-  
XX-XX-X  
XXX-X--  

XXX--XX  
XXX----  
XX----X  
X--XX--  
X-X-XX-  

X-X----  
-----XX  
---X---  
X-XXX--  
-X--XX-  

-------  
-------  
--XX-X-  
-XX--X-  
-XX-XX-  

-------  
-------  
-XXXX--  
-----XX  
-XXXXX-  

18 12 10 11 12
Artyom Tsatinyan     2021-04-24 20:11:45
User avatar

I realized my mistake, I need to enlarge my "map"

Artyom Tsatinyan     2021-04-24 20:15:49
User avatar

I removed my code so that other participants would be motivated to solve the problem themselves

Rodion (admin)     2021-04-27 07:48:43
User avatar

Artem, Hi!

Glad to see you figured it out! Verily, this problem is less or more straightforward and field edges are the most common question about it so far.

Perhaps we should introduce some, hm, hints shown after several unsuccessful submissions :)

Please login and solve 5 problems to be able to post at forum