I finish this code, but the judger says I am out of bounds, can anyone tell me why or is there anyting wrong on other places? Thanks very much.
Begged for help.
| № | Пользователь | Рейтинг |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | turmax | 3559 |
| 6 | tourist | 3541 |
| 7 | strapple | 3515 |
| 8 | ksun48 | 3461 |
| 9 | dXqwq | 3436 |
| 10 | Otomachi_Una | 3413 |
| Страны | Города | Организации | Всё → |
| № | Пользователь | Вклад |
|---|---|---|
| 1 | Qingyu | 157 |
| 2 | adamant | 153 |
| 3 | Um_nik | 147 |
| 3 | Proof_by_QED | 147 |
| 5 | Dominater069 | 145 |
| 6 | errorgorn | 142 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | TheScrasse | 134 |
| 10 | chromate00 | 133 |
I finish this code, but the judger says I am out of bounds, can anyone tell me why or is there anyting wrong on other places? Thanks very much.
Begged for help.
| Название |
|---|



You are passing the integer array
cwhose number of elements is 5 to the functioncheck(int *a)that copies the firstnitems fromatotemp. Ifn > 5, then out-of-bound error happens.Thanks for your help, but now I still stuck on test #2, without any hint. Can you help? submission
With pleasure. The problem editorial has sufficient hints.
Yeah ofcourse, but I just can't find out where going wrong
Check the following update to the editorial solution if interested.
124858743