
https://www.acmicpc.net/problem/17266

double형 max값 구하는 함수는
fmax
맨 처음 가로등 : 굴다리의 거리만큼 밝혀야 함
젤 끝 가로등 : (굴다리의 길이 - 끝 가로등의 위치)만큼 밝혀야 함
각 가로등 사이 : ceil(가로등 사이의 길이 / 2)만큼 밝혀야 함 
이 중에 max 값 찾으면 됨
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int N, M;
	cin >> N >> M;
	vector<int> v(M);
	double h = 0;
	for (int i = 0; i < M; i++) {
		cin >> v[i];
	}
	if (M == 1)	h = N;
	else {
		h = fmax(v.front(), N - v.back());
		for (int i = 0; i < M - 1; i++) {
			h = fmax(h, ceil((v[i + 1] - v[i]) / 2.0));
		}
	}
	cout << (int)h;
	return 0;
}