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 358f5019490451eec44efd9d0c397c2ed37a9989
parent 89fdc96e4331e0dbe8f0b8997552390a50df4b01
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Thu, 12 Mar 2015 19:47:10 +0100

Merge branch 'master' of github.com:a3nm/ens-ulm-1

Diffstat:
a3nm/server.cpp | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/a3nm/server.cpp b/a3nm/server.cpp @@ -14,7 +14,8 @@ struct Server{ int id, z, c; Server(int id=0, int z=0, int c=0) : id(id), z(z), c(c) {} bool operator< (const Server &s) const{ - return z/c < s.z/s.c; + if (z*s.c == s.z*c) return z < s.z; + return z*s.c < s.z*c; } };