gabrielrc's blog

By gabrielrc, history, 9 years ago, In English

Hi community, I was solving the problem 593D - Happy Tree Party and I did get an accepted verdict. The problem is: my code is wrong! I don't think many people solved it the wrong way (although I found some accepted submissions with a wrong solution), but here is the simple case that breaks my code:

7 1
1 2 2
2 3 1
3 4 2
2 5 2
5 6 2
5 7 2
1 4 5 128

The answer is 32 and my code outputs 8. Here you can find my wrong successful submission: 14486336.

I hope someone can add some test cases :D! Thanks.

  • Vote: I like it
  • +9
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it
»
9 years ago, # |
  Vote: I like it +4 Vote: I do not like it

Just realized my solution is wrong too :/