Editorial for TLE '17 Contest 7 P5 - Willson and Mating
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
Posted: April 1, 2018
Folklore
needs to walk along the V1 path every day to get to his classes. One time, he noticed that the Canada geese have arrived very early. Geese were even present in February, when snow was still around.
One observation that
made about geese was that they always seemed to be in pairs. Upon further research, he discovered that Canada geese mate for life (unlike some other species of animals, like humans).Unfortunately, the TLE '17 March contest was coming up and he had no problem ideas, not even for P1. Problem setting was becoming a chore for him and it didn't help that certain others always told him his problems were bad. He was happy, though, that his problem setting ordeal would almost be over, as only one more TLE was planned for April.
Even more unfortunately,
trapped himself early in the year by forcing Willson-themed problems that tied to the life of a real Canada goose. It was very difficult for the TLE team to come up with good problems regarding Canada geese, so most of those problems weren't well received by participants.While walking on the V1 path,
thought about geese again. Why not ask a question about the geese in pairs? He came up with a slight variation of the problem asked on the contest, but it turned out to be NP-hard (or maybe not? We don't know for sure). So he modified the problem slightly to get the current version.Unfortunately, when he presented the problem to
, he immediately saidwas disappointed that his idea turned out to be a template problem, so the TLE team decided not to use it. came up with aThis problem is literally min cost max flow. Everyone will get it instantly.
However, only hours before the start of the contest,
discovered that he had made a crucial error that he could not fix in time. Without much time left for a replacement and delaying by a day no longer an option, the team was forced to use the current version. After all, min cost max flow hasn't appeared on a DMOJ contest, and how many Canadian high school students would know min cost max flow in the first place? (Answer: not a lot, apparently. Time to teach it, .)When setting the problem, .
had to determine bounds. He asked the runtime of the min cost max flow algorithm, just to be sure. It'sAlso, being a CCO preparation contest, the team felt obliged to add subtasks. So we added an brute force subtask and an bitmask subtask.
While the contest ran, everything seemed to run well until somebody using an alt entered the contest. He got to this problem, coded a brute force, and failed. He resubmitted several times, and determining that his code was correct, he blamed us for incorrect data. Even believed it, and said that 's data was incorrect and that he should check the code. Then, asked what the minimum total distance that 's brute force was printing. Then said
nvm
i added dist^2
That was a pretty big mistake. It's pretty obvious that and do not have the same maximum/minimum properties for all .
Relieved that sqrt
anywhere in the code. That was pretty hilarious. The alt was blasting into the DMOJ Discord how he was correct and how we were wrong and that the contest was bad. The alt never ended up fixing that bug. As of now, an apology has been given.
Anyways, the moral of this story is: "Problem setting is hard, and good luck to the HS kiddies next year on CCC/CCO heh heh heh."
Comments