I recently started cp and I'm confused about the road map and Ican figureout how to solve problems. Ikonw basics but I can't solve any questions and I have no refrence to read or learn and these things bothers me
| № | Пользователь | Рейтинг |
|---|---|---|
| 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 recently started cp and I'm confused about the road map and Ican figureout how to solve problems. Ikonw basics but I can't solve any questions and I have no refrence to read or learn and these things bothers me
acording to tutorial and answer src why u should claulate max-min while you can calulate max <= n(or m) and min >= -n(or -m)
my code: ~~~~~ while (true) { scanf("%c", &c); if (c == 'R'){ r++; x--; } if (c == 'L'){ l++; x++; } if (c == 'U'){ u++; y--;} if (c == 'D'){ d++;y++;} if (c == '\n') break; Mx=max(Mx,x); My=max(My,y); my=min(my,y); mx=min(mx,x); if(Mx>=n||mx<=-n ||My>=m||my<=-m)break;
}
~~~~~
| Название |
|---|


