0 0 1 2
UURDDLLUUURRDRDDDLLU One possible shortest path is: * Going from $(sx,sy)$ to $(tx,ty)$ for the first time: $(0,0)$ → $(0,1)$ → $(0,2)$ → $(1,2)$ * Going from $(tx,ty)$ to $(sx,sy)$ for the first time: $(1,2)$ → $(1,1)$ → $(1,0)$ → $(0,0)$ * Going from $(sx,sy)$ to $(tx,ty)$ for the second time: $(0,0)$ → $(-1,0)$ → $(-1,1)$ → $(-1,2)$ → $(-1,3)$ → $(0,3)$ → $(1,3)$ → $(1,2)$ * Going from $(tx,ty)$ to $(sx,sy)$ for the second time: $(1,2)$ → $(2,2)$ → $(2,1)$ → $(2,0)$ → $(2,-1)$ → $(1,-1)$ → $(0,-1)$ → $(0,0)$
\-2 -2 1 1
UURRURRDDDLLDLLULUUURRURRDDDLLDL
{
"problem": {
"name": "Back and Forth",
"description": {
"content": "Dolphin resides in two-dimensional Cartesian plane, with the positive $x$\\-axis pointing right and the positive $y$\\-axis pointing up. Currently, he is located at the point $(sx,sy)$. In each second",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc051_c"
},
"statements": [
{
"statement_type": "Markdown",
"content": "Dolphin resides in two-dimensional Cartesian plane, with the positive $x$\\-axis pointing right and the positive $y$\\-axis pointing up. \nCurrently, he is located at the point $(sx,sy)$. In each second...",
"is_translate": false,
"language": "English"
}
]
}