commit cd2a67d1ffc41f0325056dc5412b6043c3c2a5d6 parent 75ede341637dfd719b334b1599d7afdc6443a011 Author: Antoine Amarilli <a3nm@a3nm.net> Date: Sat, 28 Mar 2015 13:33:06 +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 > 0 ? left[t+1][r][c] : 0) + + int rscore = ((a + da) > 0 ? left[t+1][r][c] : 0) + tab[t+1][a+da][next.r][next.c]; if (rscore > best) { best = rscore;