# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
199829 | ahmad_salah | Pismo (COCI18_pismo) | C++14 | 20 ms | 888 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() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n, ans = 2e9;
cin >> n;
int arr[n];
cin >> arr[0];
for (int i = 1; i < n; i++)
cin >> arr[i], ans = min(ans, abs(arr[i] - arr[i - 1]));
cout << ans << '\n';
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |