Изменения рейтингов за последние раунды временно удалены. Скоро они будут возвращены. ×

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

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

I was trying to solve this problem (56E - Domino Principle). I am stuck on Test Case 30.(Link to my submission 58845497). I tried for hours but not been able to find my mistake. My algorithm is same as the editorial given, but it is giving wrong answer verdict on test case 30. Please help me in debugging the code, and also share some debugging technique, what you use during a contest.

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

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

Auto comment: topic has been updated by sourabh_jangid (previous revision, new revision, compare).

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

No, you should debug your programs yourself

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

    Bro It is not that I didn't tried to debug. I tried it for hour's but I am unable to find the bug. That's why I asked for help.

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

      Write a brute force generator, and use the official solution as a checker. You should be able to find a small case that fails.

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

Why would someone waste his time debuging others' codes?

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

Just for fun, I tried something a little gimmicky. I looked for other submissions that got WA on test #30 (by using the status filters). Bubble_Master also got WA on test 30 (on the same output token, too) and then changed their solution slightly and got AC. Maybe you can compare their WA/AC submissions and get a hint about your mistake.