From: toomln Date: 2008-09-30T15:14:09+09:00 Subject: Re: Cookie Monster (#178) > Okay, I now realized that my cookie monster is on a diet An All-you-can-eat-patch: --- q178a.rb 2008-09-30 08:13:01.357212800 +0200 +++ q178b.rb 2008-09-30 08:11:12.540742400 +0200 @@ -12 +12 @@ - i[l] = INF + i[l] = -INF @@ -17 +17 @@ - i[l] = [nil, INF] + i[l] = [nil, -INF] @@ -30 +30 @@ - v = INF if v == -1 + v = -INF if v == -1 @@ -48 +48 @@ - if c0 < c1 + if c0 > c1 @@ -50 +50 @@ - elsif c1 < INF + elsif c1 > -INF @@ -53 +53 @@ - @path[y][x] = [false, INF] + @path[y][x] = [false, -INF]