# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
342555 | Hazem | Pismo (COCI18_pismo) | C++14 | 15 ms | 1900 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.
/*
ID: tmhazem1
LANG: C++14
TASK: pprime
*/
#include <bits/stdc++.h>
using namespace std;
#define S second
#define F first
#define LL long long
const int N = 2e5+10;
LL LINF = 100000000000000000;
LL INF = 1000000000;
int MOD = 1e9+7;
LL a[N];
int main()
{
// freopen("out.txt","w",stdout);
int n;
scanf("%d",&n);
for(int i=1;i<=n;i++)
scanf("%lld",&a[i]);
LL ans = LINF;
for(int i=1;i<n;i++)
ans = min(ans,abs(a[i]-a[i+1]));
printf("%lld\n",ans);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |