Please help me to understand that why my code gives wrong answer in test case 4? where in ideone or codeblocks gives right answer. ideone : https://ideone.com/1YmrBg my Submission: 79230302
| № | Пользователь | Рейтинг |
|---|---|---|
| 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 |
| 4 | Proof_by_QED | 146 |
| 5 | Dominater069 | 145 |
| 6 | errorgorn | 142 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | TheScrasse | 134 |
| 10 | chromate00 | 133 |
Please help me to understand that why my code gives wrong answer in test case 4? where in ideone or codeblocks gives right answer. ideone : https://ideone.com/1YmrBg my Submission: 79230302
| Название |
|---|



Auto comment: topic has been updated by ABIR (previous revision, new revision, compare).
You aren't initializing
rowandcolinmain. So ideone and codeblocks probably set everything to false for you, but CodeForces doesn't.I suggest making
rowandcolglobal, since you need to use them in another function anyway. This should zero-initialize all values in the array.Also, you may face RE or undefined behavior from index out of bounds in your
northpolefunction.Your bounds check comes after using
porqas an index in the string.Thank you very much dear. got AC. I will remember next.