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

Автор dreamoon_love_AA, 12 лет назад, По-английски
I think so because the rank 1 of unofficials code seem to be wrong(if I don't misunderstand the meaning of problem).

we can test the following data:

7 8
1 2 M
1 4 M
3 4 M
7 6 M
2 4 S
1 3 S
3 5 S
4 6 S

the output of his code is -1.
but I think
6
1 2 4 6 7 8
is one of possible solution.
  • Проголосовать: нравится
  • +47
  • Проголосовать: не нравится

»
12 лет назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится
Sad, but true =(
»
12 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится
good, how did you do it?
»
12 лет назад, # |
Rev. 2   Проголосовать: нравится +15 Проголосовать: не нравится

I think this input should somehow be tested with the official solution, to check if it's only a missing test case among the ones used during the contest or if the solution itself is wrong (maybe some test case actually used covers this case?). When this is the case, they usually make the contest unrated...

ED: Nevermind, there're others accepted codes that handle this case correctly. It's just a missing test case. That first code, however, is still wrong.