I've seen most programmers, when they declare an array globally, they take some extra spaces. for example, if the question asks for a 10^7 sized array they declare like this :
const int N = 1e7+10
int a[N]
why 10 extra spaces?
| # | 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 | Dominater069 | 131 |
| 9 | Proof_by_QED | 130 |
| 9 | AmShZ | 130 |
I've seen most programmers, when they declare an array globally, they take some extra spaces. for example, if the question asks for a 10^7 sized array they declare like this :
const int N = 1e7+10
int a[N]
why 10 extra spaces?
| Name |
|---|



When you do some operations on arrays which involve complicated indices (such as DP recursions), you can and often will access some index that is beyond $$$n$$$, such as $$$n+1$$$ or $$$n+2$$$. Usually it's just quicker to just add an arbitrary +5 or +10 than to calculate the exact number of extra spaces you need in the array.
(I personally don't do this +5/+10 thing, because I feel that this makes me lazy in thinking, but oh well, lots of people are doing it and they're just fine.)
it just feels good
It gives you +10 extra CF rating
omg sir, so if I do
will I become legendairy glandmaster and beat tourists on Codeforce??!1!1
You can get a maximum of 10 points for each problem you submit, but be cautious because a +10 in the array can also decrease your rating by 10 if you submited it wrong.
So make sure you choose them carefully