#include <bits/stdc++.h>
using namespace std;
#define int long long
#define OYY 1000000000005
#define faster ios_base::sync_with_stdio(false); cin.tie(NULL);
#define mid (start+end)/2
#define mod 1000000007
vector <int> v;;
int32_t main(){
faster
int n;cin>>n;
int dizi[n];
for(int i=0;i<n;i++){
cin>>dizi[i];
v.push_back(dizi[i]);
}
sort(v.begin(),v.end());
cout<<v[n-1]-v[0]<<'\n';
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
340 KB |
Output isn't correct |
5 |
Incorrect |
14 ms |
3024 KB |
Output isn't correct |
6 |
Incorrect |
14 ms |
3028 KB |
Output isn't correct |
7 |
Incorrect |
14 ms |
3016 KB |
Output isn't correct |