Блог пользователя jupanul

Автор jupanul, история, 8 лет назад, По-английски

I'm on the phone right now and have no laptop, so sorry for the low quality post. But I wanted to say that my solution for problem C was to set a random food for each boy and then randomly change a boy's food until the second restriction was met. Surprisingly, this passed the system tests! Can anyone relate? Did anyone else have a wrong solution that passed? Weak testcases, or what happened?

  • Проголосовать: нравится
  • +59
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится +41 Проголосовать: не нравится

That seems believable, depending on your implementation.

One solution I saw was to simply force 2i+1 and 2i+2 (for i = 0 to n-1) to be different resulting in a bipartite graph. If you implemented it in a certain way I can see your solution passing because it was accidentally like this. Otherwise, maybe the test cases are weak :)

Either way, your honesty is valuable to CF community.

»
8 лет назад, # |
  Проголосовать: нравится +22 Проголосовать: не нравится

This is definitely not "VERY wrong". For me, it was highly likely that such solution will pass (I thought about exactly the same), but came up with a real solution, but if I hadn't have right idea I would have coded that local search.

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

And why exactly is this solution (very) wrong?