# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
377060 | OptxPrime | Pismo (COCI18_pismo) | C++11 | 41 ms | 1664 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>
using namespace std;
int a[100010];
int main()
{
int n;
cin>>n;
for(int i=0;i<n;i++)cin>>a[i];
int minRazlika = abs(a[1]-a[0]);
for(int i=2;i<n;i++){
minRazlika = min(minRazlika, abs(a[i]-a[i-1]));
}
cout<<minRazlika<<endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |