Invitation to UWCOI 2020 Online Replay Contest - Rated for All

I apologise, it seems that your solution doesn’t encounter the O(N^2) blowup that I thought it did. (I guess mrho’s solution would also be same?) Unfortunately, I don’t think I have the permissions to check the cerr from the file. Testing it locally finds that it is pretty much O(N).

Apologies for the tight TL. Solutions of testers and setter were double as fast because they used map with key as int, I believe (which also led to the possibility of O(N^2) blowup). Congrats on all AC in contest, though.

Can anyone help?

I guess your code fails on “hellohello”

1
10 240
? 5
5
? 9
0
? 4
0
? 5
5
? 5
5
! 2
0

This is what I got after running your code. Let me know if anything is wrong

the output for “hellohello” should be k=2 and my code outputs 2.

P.S. i have put asserts in the code at every place after i take input assert(y!=-1). but i am not getting runtime error which means all my asserts are passing. but still i am getting WA.

Ohh yeah i forgot the output was n / key

Can you tell why am i not getting Runtime error?

Hey,

We hope that you found what you were looking for :slight_smile:

Thanks!

1 Like

well I didn’t participate but had a look at most of the problems the next day. liked the problems .

For Indian participants:

  • Top 10 from ranklist will receive 300 laddus.

Does this mean top 10 from Overall ranklist or top 10 from ranklist calculated by taking Indian participants only?

The latter.

I haven’t got laddus for this competition. How many days it will take to get laddus? @admin

As mentioned on the contest page, “Laddus will be provided post the MOSS process”. And that will take at the least a couple of weeks. Probably longer. Within a couple of months for short contests, save for some exceptions.

@admin I still haven’t got laddus for this competition. Can you please check?