Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

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

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

Slightly weak tests on this problem:

Input:
4 6 4
1 2
1 3
1 4
3 1 4 2 1 1 
2 2 2
1 3 1 3
1 2 1 1
1 2 1 1

Output:
3 1 2 5
1 6
1 4

P.S. I am not blaming anyone. Sometimes this kind of thing inevitably happens. I just wanted to let others know that their solution might be incorrect.

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

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

From the statement: As a result he picks at most k best girls he still have not invited from junctions on his way and invites them to his house to test if one of them is his dream girl. If there are less than k not invited girls on his path, he invites all of them.

At the time of the first query of type 1, he still hasn't invited any girl, so he invites girls #1, #2, #5. Then those are already invited, girl #6 has less weight than girl #4, so he now invites her, and afterwards he invites girl #4. The output seems correct to me..

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

What output did you expect? since my solution gives the same as thr one written on your post

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

    Yeah, I meant this was a correct output, but some "accepted" solutions crash on this test. For example, look at this code.

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

Actually, The testcases of problems sometimes are incomplete. I remember that one of my program can pass the test in Codeforces, but in another OJ it failed to pass because of some boundary testdatas.

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

Thanks for pointing out my mistake. And here is my new submission 20498917.