{"id":"cfdf655b-de2e-4b0f-a16e-2def4e921239","name":"Closest Distance","description":"<a href=\"https://lightoj.com/problem/closest-distance\" target=\"_blank\"><i class=\"fa fa-external-link\" aria-hidden=\"true\"> Link -> Closest Distance</i></a>","inputFormat":"Check the Link","outputFormat":"Check the Link","constraints":"Check the Link","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.util.*;\r\n\r\npublic class Main {\r\n public static void main(String[] args) throws Exception{\r\n Scanner sc = new Scanner(System.in);\r\n\r\n }\r\n}"},"ruby":{"code":""},"python":{"code":""},"javascript":{"code":""}},"points":10,"difficulty":"medium","sampleInput":"3\r\n0 0 5 0 5 5 5 0\r\n0 0 5 5 10 10 6 6\r\n0 0 5 0 10 1 1 1","sampleOutput":"Case 1: 0\r\nCase 2: 1.4142135624\r\nCase 3: 1","questionVideo":"","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"ccdbbb91-d392-43f3-8065-0ecd4a077535","name":"Ternary Search For Experts","slug":"ternary-search-for-experts-998","type":0},{"id":"047baf95-7756-4124-a99f-5338166fdf81","name":"Closest Distance","slug":"closest-distance","type":1}],"next":{"id":"49acd347-f8c9-4b41-aed4-0db4e68c2e69","name":"Restorer Distance","type":1,"slug":"restorer-distance"},"prev":{"id":"0c0673e3-1ff3-46ef-9ee5-9c9d0057071c","name":"Weakness And Poorness","type":1,"slug":"weakness-and-poorness"}}}

Closest Distance

<a href="https://lightoj.com/problem/closest-distance" target="_blank"><i class="fa fa-external-link" aria-hidden="true"> Link -> Closest Distance</i></a>

{"id":"cfdf655b-de2e-4b0f-a16e-2def4e921239","name":"Closest Distance","description":"<a href=\"https://lightoj.com/problem/closest-distance\" target=\"_blank\"><i class=\"fa fa-external-link\" aria-hidden=\"true\"> Link -> Closest Distance</i></a>","inputFormat":"Check the Link","outputFormat":"Check the Link","constraints":"Check the Link","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.util.*;\r\n\r\npublic class Main {\r\n public static void main(String[] args) throws Exception{\r\n Scanner sc = new Scanner(System.in);\r\n\r\n }\r\n}"},"ruby":{"code":""},"python":{"code":""},"javascript":{"code":""}},"points":10,"difficulty":"medium","sampleInput":"3\r\n0 0 5 0 5 5 5 0\r\n0 0 5 5 10 10 6 6\r\n0 0 5 0 10 1 1 1","sampleOutput":"Case 1: 0\r\nCase 2: 1.4142135624\r\nCase 3: 1","questionVideo":"","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"ccdbbb91-d392-43f3-8065-0ecd4a077535","name":"Ternary Search For Experts","slug":"ternary-search-for-experts-998","type":0},{"id":"047baf95-7756-4124-a99f-5338166fdf81","name":"Closest Distance","slug":"closest-distance","type":1}],"next":{"id":"49acd347-f8c9-4b41-aed4-0db4e68c2e69","name":"Restorer Distance","type":1,"slug":"restorer-distance"},"prev":{"id":"0c0673e3-1ff3-46ef-9ee5-9c9d0057071c","name":"Weakness And Poorness","type":1,"slug":"weakness-and-poorness"}}}
plane

Editor


Loading...

Closest Distance

medium

Constraints

Check the Link

Format

Input

Check the Link

Output

Check the Link

Example

Sample Input

3 0 0 5 0 5 5 5 0 0 0 5 5 10 10 6 6 0 0 5 0 10 1 1 1

Sample Output

Case 1: 0 Case 2: 1.4142135624 Case 3: 1

Discussions

Show Discussion

Related Resources

related resources

Turning Off Zen Mode