# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
176086 | Doda | Pismo (COCI18_pismo) | C++14 | 16 ms | 2040 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;
long long n,a[100005],najm=1000000001,najv;
int main () {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> n;
for (int i = 0;i<n;i++){
cin >> a[i];
if (a[i] > najv)
najv = a[i];
if (a[i] < najm)
najm = a[i];
}
cout << najv-najm;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |