Share a bug making me desperate when I found after contest

Revision en1, by dreamoon_love_AA, 2017-06-04 19:31:51

In SnackDown 2017 Online Elimination Round yesterday, I cannot get AC from problem Waiting in a Queue during contest.

After many hours of contest, I found a bug of my code:

The correct input format of this problem is:

n

a1 a2 ... an

b1 b2 ... bn

But I read Input as following:

n

a1 b1

a2 b2

.
.
.

an bn

I felt shocked after finding this bug. Why can I pass sample with this bug !!??

Then I saw the sample carefully. It shows:

2
3 2
2 2

I don't know how to use English to describe my though....

And I thought, if I get AC by just fixing this bug, I must post this bug on Codeforces!

Now it's the time.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English dreamoon_love_AA 2017-06-04 19:31:51 846 Initial revision (published)