| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | jiangly | 3631 |
| 4 | Kevin114514 | 3574 |
| 5 | maroonrk | 3521 |
| 6 | strapple | 3515 |
| 7 | Radewoosh | 3461 |
| 8 | tourist | 3428 |
| 9 | turmax | 3378 |
| 10 | Um_nik | 3376 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 162 |
| 2 | adamant | 148 |
| 3 | Um_nik | 146 |
| 4 | Dominater069 | 143 |
| 5 | errorgorn | 141 |
| 6 | cry | 138 |
| 7 | Proof_by_QED | 136 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 10 | soullless | 133 |
|
+6
The first guy must be really suffering :( |
|
0
I don't know which problem you are referring to, but I see that you are passing the parameter Here's a webpage that talks about passing by reference, in case you want to know more about it. It's really important. |
|
+7
I actually was in the same situation like half an year ago, and competing wasn't being fun for me anymore. But then time passed, I figured I would try again, and I'm having a blast. My problem was that I was always practicing hard problems that would take me a lot of time to solve, and so I was always frustrated. My advice is this: whenever you find that a problem took you a lot of time to solve and it was very difficult, reward yourself by doing some easy problems. This way, you'll trick your brain to associate solving difficult problems with rewarding yourself, and easy problems with the actual reward. Sweet endorphins all around. |
|
+4
Great joke man, +1 and favourited |
|
0
Using your solution of Div1A, doesn't this testcase print 2 instead of 3? The $$$l_i$$$ would be and the $$$r_i$$$ would be The only elements that satisfy $$$a_{i - 1} + 1 \lt a_{i + 1}$$$ are the first and the last if you interpret the element before the first and after the last as $$$-\infty$$$. And for those, $$$l_{i - 1} + 1 + r_{i + 1} = 2$$$ ($$$l_{i - 1} = 0$$$ when $$$i = 1$$$, and $$$r_{i + 1} = 0$$$ when $$$i = n$$$). So the answer is 2. But there is a subsegment of length 3: we could choose the last 3 elements |
|
+3
No, the n is the length of the array, not the amount of different values in the array. |
| Name |
|---|


