rinori's blog

By rinori, history, 5 years 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.me/contest/988/submission/65531257

What is the reason for this error?

Thank you.

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

| Write comment?
»
5 years 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$$$.