| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | Kevin114514 | 3659 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3408 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3312 |
| 10 | idontwannadothis…e | 3191 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 153 |
| 2 | nik_exists | 151 |
| 3 | maroonrk | 150 |
| 4 | maspy | 149 |
| 5 | AmShZ | 146 |
| 6 | Um_nik | 143 |
| 7 | Errichto | 139 |
| 8 | adamant | 135 |
| 9 | BledDest | 134 |
| 10 | cry | 130 |
|
0
learn like basics how for loops and while loops work and then you can start practicing from some sheets like tle-eliminators or acodedaily |
|
0
In the problem, in Y-direction you can only walk upwards.... so if you want to reach (c,d) you need to walk (d-b) distance diagonally. 1.If d<b then you can't reach (c,d) so print -1; 2.now if(d>=b) then perform d-b diagonal operations. Note that you can't perform anymore diagonal operations as you go above the required level. 3 . Now after performing (d-b) diagonal operations you are on (a+(d-b),d) coordinate. From here you can not go right you can only go left. So, if c is to the right of it then print -1, else take (c-(a+(d-b))) steps more and print the ans. so the ans would be (d-b)+(c-(a+(d-b))) steps. If you won't get any part feel free to ask for clarification |
|
0
which one ? |
| Name |
|---|


