文件名称:Find
介绍说明--下载内容均来自于网络,请自行研究使用
北邮复试上机题(两种方法):
Descr iption
在平面上的n个点中找出横坐标最小的点。
Input
第一行是一个正整数n(1<=n<=1000),表示一共有n个点。
接下来n行,每行2个整数,分别表示每个点的横坐标和纵坐标。
Output
输出横坐标最小的那个点的横坐标和纵坐标,如果横坐标最小的点有多个,则只输出其中纵坐标最小的那个点。
Sample Input
5
5 2
2 3
2 4
3 2
4 1
Sample Output
2 3-Descr iption
N points on the plane to find the abscissa of the minimum point.
Input
The first line is a positive integer n (1 <= n <= 1000), said a total of n points.
The next n lines, each line two integers that represent horizontal and vertical coordinates of each point.
Output
Output abscissa of the minimum point of abscissa and ordinate, if the abscissa of the minimum point, only the output of which the vertical axis the smallest point.
Sample Input
5
52
23
24
32
41
Sample Output
23
Descr iption
在平面上的n个点中找出横坐标最小的点。
Input
第一行是一个正整数n(1<=n<=1000),表示一共有n个点。
接下来n行,每行2个整数,分别表示每个点的横坐标和纵坐标。
Output
输出横坐标最小的那个点的横坐标和纵坐标,如果横坐标最小的点有多个,则只输出其中纵坐标最小的那个点。
Sample Input
5
5 2
2 3
2 4
3 2
4 1
Sample Output
2 3-Descr iption
N points on the plane to find the abscissa of the minimum point.
Input
The first line is a positive integer n (1 <= n <= 1000), said a total of n points.
The next n lines, each line two integers that represent horizontal and vertical coordinates of each point.
Output
Output abscissa of the minimum point of abscissa and ordinate, if the abscissa of the minimum point, only the output of which the vertical axis the smallest point.
Sample Input
5
52
23
24
32
41
Sample Output
23
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Find.cpp