dreamoon_love_AA's blog

By dreamoon_love_AA, history, 7 years ago, In English

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.

  • Vote: I like it
  • +159
  • Vote: I do not like it

»
7 years ago, # |
  Vote: I like it +30 Vote: I do not like it

Wow this reminds me of this COCI contest:
http://hsin.hr/coci/archive/2015_2016/contest1_tasks.pdf
problem RELATIVNOST
where i made the same mistake http://paste.ubuntu.com/24773858/ but for some reason the answer was correct XD (maybe COCI wanted to troll people)
Unfortunately ... your mistake was in an important contest with an onsite round, i'm sorry to hear that
Anyway i hope we wouldn't make the same mistake again

»
7 years ago, # |
Rev. 2   Vote: I like it +55 Vote: I do not like it

We had a very similar bug during the ICPC finals -- we failed our D because I had typed "cin >> N >> M" instead of "cin >> M >> N". (But oh well, we still got a medal.)