commit 04e6b3102360da5afa905b27bc25c0b4ff67596f parent a4fecd1e8f14033ecec66541363539fae72fb3a1 Author: Antoine Amarilli <a3nm@a3nm.net> Date: Sat, 28 Mar 2015 13:37:12 +0100 fix Diffstat:
contest/a3nm/main.cpp | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contest/a3nm/main.cpp b/contest/a3nm/main.cpp @@ -122,7 +122,7 @@ int main(int argc, char **argv) { Pt next = dest[a + da][r][c]; if (next.r < 0) break; - int rscore = ((a + da) > 0 ? left[t+1][r][c] : 0) + + int rscore = ((a + da) > 0 ? left[t+1][next.r][next.c] : 0) + tab[t+1][a+da][next.r][next.c]; if (rscore > best) { best = rscore;