Wow... I 'accidentally' handled such case without knowing itlittle joey wrote:Yes, duplicates occur in the dictionary, but they should be printed only once in the output.
![:o](./images/smilies/icon_eek.gif)
![:wink:](./images/smilies/icon_wink.gif)
I don't know about how to solve this problem using floodfill+math, but you can try to use the same algorithm as problem 108 (Maximum Sum).Roby wrote:Any idea how to solve this problem?
Is there something related to floodfill + math method to solve this one?
think about greedy algorithmvcchung wrote:I am not very good at programming, but I am learning.
When I try to do 10440, but I found that it has many variations so that difficult to finish it.
Can anyone please give me some ideas, guidelines or algorithm for this problem??
Many thanks!