Submission #799482

#TimeUsernameProblemLanguageResultExecution timeMemory
799482Trisanu_DasPismo (COCI18_pismo)C++17
70 / 70
27 ms1540 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int n, ans = 1e9; cin >> n; int v[n]; for(int i = 0; i < n; i++)cin >> v[i]; for(int i = 1; i < n; i++) ans = min(ans, max(v[i] - v[i - 1], v[i - 1] - v[i])); cout << ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...