Submission #180144

#TimeUsernameProblemLanguageResultExecution timeMemory
180144Linca_RobertPismo (COCI18_pismo)C++14
70 / 70
74 ms1656 KiB
#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 timeMemoryGrader output
Fetching results...