# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
180144 | Linca_Robert | Pismo (COCI18_pismo) | C++14 | 74 ms | 1656 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;
const int DIM = 1e5 + 5;
int N, ans;
int arr[DIM];
int main(){
cin >> N;
for( int i = 1; i <= N; i++ )
cin >> arr[i];
ans = 0x3f3f3f3f;
for( int i = 2; i <= N; i++ )
ans = min( ans, (int)( abs( arr[i] - arr[i - 1] ) ) );
cout << ans;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |