Submission #871286

#TimeUsernameProblemLanguageResultExecution timeMemory
871286mertozelPismo (COCI18_pismo)C++11
70 / 70
26 ms1796 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ int n; cin >> n; vector <int> vec(n); for(int &i : vec) cin >> i; int ans = INT_MAX; for(int i = 0; i<n-1; i++) { ans = min(ans, abs(vec[i]-vec[i+1])); } cout << ans << "\n"; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...