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

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

Hi there,

I solved the following Problem using $$$0-1$$$ bfs.

In the first submission 95671950 I got WA on test 7. I only changed the initial placement in the deque and got Accepted on this submission 95669200

Here is a picture that shows the comparison between the two submissions.

I suspect that the test data is weak (because both submission should get Wrong Answer Or both submission should get Accepted) or I am missing something about $$$0-1$$$ bfs.

possible

If you can shed some light into this, I would be thankful.

UPD: dorijanlendvaj has found a case that breaks my accepted solution, which means that the test data of the problem is weak or there is a problem with model solution. Thanks dorijanlendvaj

Test Case that should be added to test data

TestCase

I hope someone would add this test case using the uphacking feature

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

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

If you do emplace_front, you're starting deque will look something like {start, 3}, {start, 2}, {start, 1}, {start, 0}, which is incorrect ordering, considering you are removing elements from the start.

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

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

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

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