# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
96286 | dalgerok | Pismo (COCI18_pismo) | C++14 | 17 ms | 760 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<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int n;
cin >> n;
int a[n];
for(int i = 0; i < n; i++){
cin >> a[i];
}
int mn = 2e9;
for(int i = 0; i + 1 < n; i++){
mn = min(mn, abs(a[i] - a[i + 1]));
}
cout << mn;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |