Canadian Computing Competition: 2020 Stage 1, Junior #3
Mahima has been experimenting with a new style of art. She stands in front of a canvas and, using her brush, flicks drops of paint onto the canvas. When she thinks she has created a masterpiece, she uses her 3D printer to print a frame to surround the canvas.
Your job is to help Mahima by determining the coordinates of the smallest possible rectangular frame such that each drop of paint lies inside the frame. Points on the frame are not considered inside the frame.
Input Specification
The first line of input contains the number of drops of paint,
For
Output Specification
Output two lines. Each line must contain exactly two non-negative integers separated by a single comma (no spaces). The first line represents the coordinates of the bottom-left corner of the rectangular frame. The second line represents the coordinates of the top-right corner of the rectangular frame.
Sample Input
5
44,62
34,69
24,78
42,44
64,10
Output for Sample Input
23,9
65,79
Explanation of Output for Sample Input
The bottom-left corner of the frame is
Comments
Help me how do i do it leoliu93233, rl007, ginasoth, htoshiro, Narcariel, richardzhang
the sequel to this: https://dmoj.ca/problem/ccc21s2
Can someone please help me and tell me why I keep getting IR (Invalid Return)?
This comment is hidden due to too much negative feedback. Show it anyway.
use split instead of trying to brute force the coordinates
Can either of the coordinates be 0?
No.