| # | User | Rating |
|---|---|---|
| 1 | Benq | 3857 |
| 2 | jiangly | 3810 |
| 3 | maroonrk | 3534 |
| 4 | tourist | 3528 |
| 5 | Kevin114514 | 3510 |
| 6 | turmax | 3411 |
| 7 | Um_nik | 3387 |
| 8 | Radewoosh | 3367 |
| 9 | heuristica | 3322 |
| 10 | strapple | 3317 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | maspy | 150 |
| 3 | Um_nik | 146 |
| 4 | Errichto | 139 |
| 5 | adamant | 136 |
| 6 | maroonrk | 134 |
| 7 | DNR | 133 |
| 8 | nik_exists | 131 |
| 8 | Dominater069 | 131 |
| 10 | Proof_by_QED | 130 |
|
+17
I've solved it with a greedy approach, if two persons are assigned to the same shop, the assigned friends must be the top 2 friends with maximum values for that shop, and the remaining friends are free to choose their shops. |
|
+12
D can be solved using the pigeon hole principle as there exist significantly many repetitions in the extreme case where $$$n=10^5$$$ and $$$a_i$$$ takes at most $$$2\times10^4$$$ values, we can sort and eliminate adjacent identical elements using $$$(-1, 1)$$$ which significantly reduces the absolute sum of $$$b_i$$$'s, remaining cases can be handled similar to the editorial. |
|
0
I had a completely different approach, by making observations from the brute force solution. Even doesn't work due to parity. For the odd case, it turns out that the direct observation that can be made is by thinking it backward since the operations are invertible, considering an initial array of $$$k$$$ zeroes, iteratively picking the maximum sized island of zeroes, and making the operation such that it fills the highest power of $$$2$$$ number of ones at the end in this island while performing this operation at most one new island of zeroes will be created due to size of the flip, we can just push them into the priority queue. Example |
|
0
I overkilled it with digit dp. |
|
+9
|
|
0
For problem C2 "Method 2 — Greedy 1" can be implemented UPD: It turns out that my previous submission (without BIT) gives TLE for this hack case since my worst-case time complexity was $$$\mathcal{O}(n^2\log{}n)$$$, after optimizing using BIT it reduces to $$$\mathcal{O}(n\log{}n)$$$. |
|
+19
A non recommended approach for Div 2 problem $$$D$$$ |
| Name |
|---|


