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

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

Hello for everyone in codeforces. In this last contest I sent two identical solutions only , one gave me Wrong Answer in test case 1, although in my computer it was good but I sent that same solution with one more command (cout << "";) which I see insignificant and should not vary the result and gives Accepted . I do not know what could have happened, please could you help me understand my mistake. Thank you in advance.

these are my shipments :

1-Wrong Answer in test case one

2-Accepted

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

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

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

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

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

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

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

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

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

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

You probably have undefined behavior somewhere. Try running it in a debugger.

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

    pos is uninitialized when this line executes: if (k > pos) { cout << "NO"; }.