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

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

UPD : Found the bug :)

Hello everyone last day contest problem DIV2 B- not afraid . I solved this problem , One submission with break getting WA on test 10 but test case is too long so cant guess the bug — > WA on test 10 , Submission With break statement .

Another same submission got AC where i just cut the break statement -> GOT AC submission without break statement .

Can not find any short test case which will give the WA for first code .

Here is the diifference : Difference

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

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

suppose you have total 13 entries and you have got into the if condition on 4th entry and you break from the while loop then there are still 9 entries to scan(input) but you are not scanning them. Next time the scan will scan from the remaining numbers and hence the wrong asnwer.