# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
146099 | youssan_william | Pismo (COCI18_pismo) | C++14 | 71 ms | 1016 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;
typedef long long ll;
int main()
{
ll n ;
cin >> n;
ll arr[n+1];
for(int i = 1 ; i <=n ;i++)
cin >> arr[i];
ll answer=10000000000;
for(int i = 2 ; i <= n ;i++)
{
answer= min(answer,abs(arr[i]-arr[i-1]));
}
cout << answer ;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |