"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl
Campbell Ritchie wrote:I think the confusion in that method is different from that, Fred.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Campbell Ritchie wrote:If you go from D to J, as I said earlier, what does your minimal_distance() method return? Now, what happens if you go from J to D? What would happn if you go from Y to D?
"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl
Campbell Ritchie wrote:Well, you have found one shortcut, that you add the complete length to your total, not 1 per letter.
"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl
Campbell Ritchie wrote:
1: I don't think your method is correctly calculating the shorter distance between pickups. Did you try D→J, J→D and Y→D? 2: As Fred said yesterday, you need to add 1″ to the time. What you did in the older version of the method is add 1 foot to the distance.
"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl
D.J. Quavern wrote:2. oooh. Ok, I was really confused! I don't know why I did that retrospectively...
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
alphabet = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ '")
Liutauras Vilda wrote:English alphabet has 26 letters. Everywhere in your calculations you use 28. So again, the talk is about those 2 characters which follow after Z.
"If you lie to the computer, it will get you."
Favorite Granny's Wisdom Pearl
D.J. Quavern wrote:Please read first the problem description. The Kattis-server is on maintenance today, but you will understand if you read it.
Earlier, I wrote:OR some other approach to problem to achieve whatever there is in that Kattis-server, so the code wouldn't be puzzling.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |