#TopCoderSXOI contest: Learned from @Jeremiadlee that Javascript has associative arrays