题目: http://ac.jobdu.com/problem.php?pid=1483
代码:
#include<cstdio>
#include<algorithm>
using
namespace
std;
int
A[10100];
int
N,max,min;
int
main(){
while
(~
scanf
(
"%d"
,&N)){
for
(
int
i=0;i<N;i++)
scanf
(
"%d"
,&A[i]);
sort(A,A+N);
printf
(
"%d %d\n"
,A[N-1],A[0]);
}
return
0;
}