| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | Kevin114514 | 3659 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3382 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3312 |
| 10 | idontwannadothis…e | 3191 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 155 |
| 2 | nik_exists | 151 |
| 3 | maspy | 149 |
| 4 | AmShZ | 145 |
| 5 | Um_nik | 143 |
| 6 | Errichto | 139 |
| 7 | BledDest | 136 |
| 8 | adamant | 134 |
| 9 | maroonrk | 132 |
| 10 | cry | 130 |
|
0
Sorry, I had messed up the transitions. They're correct now. Thanks for the feedback :D |
|
0
Another way to think about the solution for B is: Let $$$pos[i]$$$ be the count of sub arrays that end in i ($$$[k..i]$$$ for $$$k \geq 0$$$) whose product is positive, and $$$neg[i]$$$ the count of subarrays that end in i ($$$[k..i]$$$ for $$$k \gt = 0$$$) whose product is negative. The base case for them is simple: Given that $$$pos[x-1]$$$ and $$$neg[x-1]$$$ are calculated, we can easily calculate $$$pos[x]$$$ and $$$neg[x]$$$ as follows: After these arrays are fully calculated, the amount of sub arrays that are positive is the sum of all $$$pos[i]$$$, and the amount of arrays that are negative is the sum of $$$neg[i]$$$ My submission 60721761 |
|
0
run dijkstra from vertex 1 to all other ones that gives you a tree of shortest paths all you need to do is remove leaf by leaf untill you have k+1 vertices (and k edges) it clearly maximizes the number of 'good vertices' and is always valid as well |
|
+26
why exactly did people try to submit solutions with cout << 0 anyway? that feels just odd to me |
|
0
my solution for D is WA on #7, can someone tell me what i'm doing wrong? i'm counting for every 'i' the size of the largest array [i, i+1, ...] that is present on every array, then i sum all these values. my code returns correct results for all other testcases with small size |
|
0
Nice, really clean solution. Thanks a lot for the explanation :D |
| Name |
|---|


