delete pics to save space
This commit is contained in:
18
history_source/信息学奥赛一本通/1.5.1.11.cpp
Normal file
18
history_source/信息学奥赛一本通/1.5.1.11.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include<cstdio>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
int n,max,min,x;
|
||||
scanf("%d",&n);
|
||||
scanf("%d",&x);
|
||||
max=min=x;
|
||||
for(int i=1;i<n;i++)
|
||||
{
|
||||
scanf("%d",&x);
|
||||
if(x<min) min=x;
|
||||
if(x>max) max=x;
|
||||
}
|
||||
printf("%d\n",max-min);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user