{"id":"003f3039-2554-4a4b-a26c-0428dceb95e9","name":"Trick Or Treat","description":"<a href=\"https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3349\" target=\"_blank\"><i class=\"fa fa-external-link\" aria-hidden=\"true\"> Link -> Trick or Treat</i></a>","inputFormat":"Check the link","outputFormat":"Check the link","constraints":"Check the link","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\n\r\npublic class Main {\r\n public static void main(String[] args) throws Exception{\r\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\r\n }\r\n}"},"ruby":{"code":""},"python":{"code":""},"javascript":{"code":""}},"points":10,"difficulty":"medium","sampleInput":"2\r\n1.5 1.5\r\n3 0\r\n\r\n1\r\n0 0\r\n\r\n4\r\n1 4\r\n4 4\r\n-3 3\r\n2 4\r\n\r\n5\r\n4 7\r\n-4 0\r\n7 -6\r\n-2 4\r\n8 -5\r\n\r\n0","sampleOutput":"1.500000005 1.500000000\r\n-0.000000003 0.000000003\r\n0.999999995 5.000000003\r\n3.136363632 7.136363639\r\n","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":"c39df45b-832e-45ac-8ea9-8d37bb47e30c","name":"Trick Or Treat","slug":"trick-or-treat","type":1}],"next":{"id":"134f0f71-402a-4503-a540-f2b303e29278","name":"Devu And His Brother","type":1,"slug":"devu-and-his-brother"},"prev":{"id":"49acd347-f8c9-4b41-aed4-0db4e68c2e69","name":"Restorer Distance","type":1,"slug":"restorer-distance"}}}

Trick Or Treat

<a href="https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3349" target="_blank"><i class="fa fa-external-link" aria-hidden="true"> Link -> Trick or Treat</i></a>

{"id":"003f3039-2554-4a4b-a26c-0428dceb95e9","name":"Trick Or Treat","description":"<a href=\"https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3349\" target=\"_blank\"><i class=\"fa fa-external-link\" aria-hidden=\"true\"> Link -> Trick or Treat</i></a>","inputFormat":"Check the link","outputFormat":"Check the link","constraints":"Check the link","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\n\r\npublic class Main {\r\n public static void main(String[] args) throws Exception{\r\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\r\n }\r\n}"},"ruby":{"code":""},"python":{"code":""},"javascript":{"code":""}},"points":10,"difficulty":"medium","sampleInput":"2\r\n1.5 1.5\r\n3 0\r\n\r\n1\r\n0 0\r\n\r\n4\r\n1 4\r\n4 4\r\n-3 3\r\n2 4\r\n\r\n5\r\n4 7\r\n-4 0\r\n7 -6\r\n-2 4\r\n8 -5\r\n\r\n0","sampleOutput":"1.500000005 1.500000000\r\n-0.000000003 0.000000003\r\n0.999999995 5.000000003\r\n3.136363632 7.136363639\r\n","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":"c39df45b-832e-45ac-8ea9-8d37bb47e30c","name":"Trick Or Treat","slug":"trick-or-treat","type":1}],"next":{"id":"134f0f71-402a-4503-a540-f2b303e29278","name":"Devu And His Brother","type":1,"slug":"devu-and-his-brother"},"prev":{"id":"49acd347-f8c9-4b41-aed4-0db4e68c2e69","name":"Restorer Distance","type":1,"slug":"restorer-distance"}}}
plane

Editor


Loading...

Trick Or Treat

medium

Constraints

Check the link

Format

Input

Check the link

Output

Check the link

Example

Sample Input

2 1.5 1.5 3 0 1 0 0 4 1 4 4 4 -3 3 2 4 5 4 7 -4 0 7 -6 -2 4 8 -5 0

Sample Output

1.500000005 1.500000000 -0.000000003 0.000000003 0.999999995 5.000000003 3.136363632 7.136363639

Discussions

Show Discussion

Related Resources

related resources

Turning Off Zen Mode