#include #include using namespace std; const int N = 1e5 + 5; int dist[N], l, n, m; bool check(int x) { if (dist[0] > x) return false; int d = 0, cnt = 1; for (int i = 1; i < n; i++) if (dist[i] - d > x) { d = dist[i - 1]; if (dist[i] - d > x) return false; cnt++; } return cnt <= m; } int main() { while (~scanf("%d%d%d", &l, &n, &m)) { for (int i = 0; i < n; i++) scanf("%d", &dist[i]); dist[n++] = l; sort(dist, dist + n); int b = 0, e = l, ans = l, mid; while (b < e) if (check(mid = (b + e) / 2)) ans = e = mid; else b = mid + 1; printf("%d\n", ans); } return 0; }