#TCTM6452. Art
0
Art
Art
题目描述
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. Mahima一直在尝试一种新的艺术风格。她站在画布前,用画笔在画布上轻弹颜料。当她认为自己创作了一幅杰作时,她会用3D打印机打印一个框架,将画布包围起来。你的工作是帮助马希玛,确定尽可能小的矩形框架的坐标,使每一滴油漆都位于框架内。框架内不考虑框架上的点。输入格式
The first line of input contains the number of drops of paint, N, where $2 ≤ N ≤ 100$ and N is an integer. Each of the next N lines contain exactly two positive integers X and Y separated by one comma (no spaces). Each of these pairs of integers represents the coordinates of a drop of paint on the canvas. Assume that $X < 100$ and $Y < 100$, and that there will be at least two distinct points.The coordinates $(0, 0)$ represent the bottom-left corner of the canvas. For $12$ of the $15$ available marks, X and Y will both be two-digit integers. 输入的第一行包含油漆滴数N,其中 $2≤N≤100$,N是一个整数。接下来的N行中的每一行都正好包含两个正整数 $X$ 和 $Y$,用一个逗号分隔(没有空格)。这些整数对中的每一个都表示画布上一滴油漆的坐标。假设 $X<100$ 和 $Y输出格式
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. 输出两行。每行必须正好包含两个非负整数,由一个逗号分隔(没有空格)。第一行表示矩形框架左下角的坐标。第二条线表示矩形右上角的坐标框架。5
44,62
34,69
24,78
42,44
64,10
23,9
65,79