Related to CSES — Collecting Numbers
Problem statement here. I understood the solution for this.
How to compute the minimum number of rounds required? (this is not asked in that question)
AtCoder Beginner Contest 485 discussion