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?
| № | Пользователь | Рейтинг |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3611 |
| 4 | jiangly | 3583 |
| 5 | strapple | 3515 |
| 6 | tourist | 3470 |
| 7 | dXqwq | 3436 |
| 8 | Radewoosh | 3415 |
| 9 | Otomachi_Una | 3413 |
| 10 | Um_nik | 3376 |
| Страны | Города | Организации | Всё → |
| № | Пользователь | Вклад |
|---|---|---|
| 1 | Qingyu | 163 |
| 2 | adamant | 150 |
| 3 | Um_nik | 146 |
| 4 | Dominater069 | 144 |
| 5 | errorgorn | 141 |
| 6 | cry | 139 |
| 7 | Proof_by_QED | 136 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 9 | TheScrasse | 134 |
| Название |
|---|



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 ??