| # | 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 | 132 |
| 9 | Dominater069 | 131 |
| 10 | Proof_by_QED | 130 |
|
0
constraints: |
|
0
Is your approach, fenwick tree to calculate the number of elements greater than or equal to A[i] (lets call this count as c) and multiply it with A[i]? lets assume we updated the fenwick tree and calculated the answer for prefix ending at i. for the prefix i+1, if we add the A[i+1] in the tree, it will change the "c" of elements less than or equal to A[i+1] and that will change the value c*A[j] (j from 0 to i, where A[j] <= A[i+1]). In that case, we should calculate again for prefix ending at i. |
|
+24
Is your approach, calculate value at an index i and compare the value with the previous ans? But the element at this index can affect ans calculated before. |
|
+2
Nice explanation by vishwas_007 |
|
+46
Does anyone know why Itst_boyfriend was removed from the contest? |
|
0
|
|
+5
when you go to sleep and when you wake up? |
|
0
I also gave the same input |
|
0
I found that after giving invalid input for hacking |
|
+35
cc is the internet explorer of the programming websites. |
|
+5
how you got the idea for lunchclub? |
|
+33
a weird way to climb up the leaderboard... |
| Name |
|---|


