rinori's blog

By rinori, history, 3 weeks ago, In English,

I get this error on one test case. My program runs properly on the local machine. Then I submitted this code which worked perfectly

https://codeforces.com/contest/988/submission/65531257

What is the reason for this error?

Thank you.

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

In case, there are $$$\ge k$$$ distinct integers, you only have to output $$$k$$$ of them, but you are outputting more than $$$k$$$. So, before printing resize $$$B$$$ to $$$k$$$.