ens-ulm-1-2015

google hashcode 2015 source for team ens-ulm-1
git clone https://a3nm.net/git/ens-ulm-1-2015/
Log | Files | Refs

commit d18faf376b7e5650aeafebb4a46d228240b1feaf
parent f1d8a51605d038664d3c98094bfb3866d864c776
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sat, 28 Mar 2015 14:31:39 +0100

rand

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 @@ -135,7 +135,7 @@ int planify(int b) { break; 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 || (rscore == best && da > bestda)) { + if (rscore > best || (rscore == best && (rand() % 2))) { best = rscore; bestda = da; }