{"code":"22stra2","name":"Hiệu hai số nhỏ nhất  (THTA Sơn Trà 2022)","description":"Cho trước $4$ số nguyên $a, b, c, d$. Chúng ta sẽ chọn các số nguyên $x$ và $y$ sao cho $a\\le x\\le b$ và $c\\le y\\le d$. \r\n\r\n**Yêu cầu**: Tìm giá trị nhỏ nhất có thể có của $x − y$.\r\n\r\n<h4>Input</h4>\r\n\r\n- Dòng thứ nhất chưa $2$ số nguyên $a,b\\ (0< a,b \\le 10^{12})$.\r\n- Dòng thứ hai chưa $2$ số nguyên $c,d\\ (0< c,d \\le 10^{12})$.\r\n\r\n<h4>Output</h4>\r\n\r\n- In ra giá $x-y$ nhỏ nhất.\r\n\r\n<h4>Example</h4>\r\n\r\n!!! question \"Test 1\"\r\n\r\n    ???+ \"Input\"\r\n        ```sample\r\n        0\r\n        10\r\n        0\r\n        10\r\n        ```\r\n    \r\n    ???+ success \"Output\"\r\n        ```sample\r\n        -10\r\n        ```\r\n    \r\n!!! question \"Test 2\"\r\n\r\n    ???+ \"Input\"\r\n        ```sample\r\n        10\r\n        15\r\n        7\r\n        9\r\n        ```\r\n    \r\n    ???+ success \"Output\"\r\n        ```sample\r\n        1\r\n        ```","points":100.0,"partial":true,"time_limit":1.0,"memory_limit":262144,"short_circuit":false,"allowed_languages":[34,36,37,14,28,38,39,18,17,29,23,27,35,25,26,19,32,8,15,16,24,20,33,13,41,21,40],"is_public":true,"is_manually_managed":false,"permissions":{"can_edit":false}}