# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
871286 | mertozel | Pismo (COCI18_pismo) | C++11 | 26 ms | 1796 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;
using ll = long long;
int main(){
int n;
cin >> n;
vector <int> vec(n);
for(int &i : vec) cin >> i;
int ans = INT_MAX;
for(int i = 0; i<n-1; i++) {
ans = min(ans, abs(vec[i]-vec[i+1]));
}
cout << ans << "\n";
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |