# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
799482 | Trisanu_Das | Pismo (COCI18_pismo) | C++17 | 27 ms | 1540 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;
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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |