Submission #799482

# Submission time Handle Problem Language Result Execution time Memory
799482 2023-07-31T15:02:29 Z Trisanu_Das Pismo (COCI18_pismo) C++17
70 / 70
27 ms 1540 KB
#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
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 308 KB Output is correct
5 Correct 25 ms 1484 KB Output is correct
6 Correct 27 ms 1540 KB Output is correct
7 Correct 24 ms 1396 KB Output is correct