2 ms·
Ooh, that's more elegant than the direction I was going with (which I'm not sure would have worked). Note that the "sort, put in vector, order lexicographicall
by Sniffnoy 12y ago
Ooh, that's more elegant than the direction I was going with (which I'm not sure would have worked). Note that the "sort, put in vector, order lexicographically" can be rephrased as "keep a vector of how many grains are at each distance, compare lexicographically". I think that makes it a little clearer.