In today's E problem, my submission used exactly n-1 queries for each n to give out the answer. Can this be proven to be the least number of queries needed or is a better bound achievable?
In today's E problem, my submission used exactly n-1 queries for each n to give out the answer. Can this be proven to be the least number of queries needed or is a better bound achievable?
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | jiangly | 3670 |
| 3 | Kevin114514 | 3657 |
| 4 | maroonrk | 3355 |
| 5 | Um_nik | 3353 |
| 6 | squareOf105 | 3346 |
| 7 | tourist | 3343 |
| 8 | strapple | 3324 |
| 9 | heuristica | 3322 |
| 10 | jiangbowen | 3291 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | nik_exists | 150 |
| 2 | maspy | 150 |
| 4 | AmShZ | 143 |
| 5 | Um_nik | 142 |
| 6 | Errichto | 139 |
| 7 | adamant | 137 |
| 8 | BledDest | 135 |
| 9 | maroonrk | 133 |
| 10 | qwexd | 130 |
| Name |
|---|



E was one of all time CRINGE problems.
E was decent i guess
Obviously, you can binary search for the first $$$i$$$ such that $$$f(1, i) \gt 0$$$, but it's still $$$O(n)$$$ queries in the worst case.
why only for first, like we can binary search for second also such that f(1,j) > f(1,i), then we can fill 0 in between i and j and 1 at j and continue so on. Is it also n queries ??