/* * Solution Template for Off the Track * * Australian Informatics Olympiad 2025 * * This file is provided to assist with reading of input and writing of output * for the problem. You may modify this file however you wish, or * you may choose not to use this file at all. */ #include /* N is the number of students. */ int N; /* L is the length of the track. */ int L; /* * P contains the locations of the students. Note that the array starts from 0, * and so the values are P[0] to P[N-1]. */ int P[200005]; int answer; int main(void) { /* Read the values of N, L, and the student locations. */ scanf("%d%d", &N, &L); for (int i = 0; i < N; i++) { scanf("%d", &P[i]); } /* * TODO: This is where you should compute your solution. Store the fewest * number of seconds you need to end the game into the variable answer. */ /* Write the answer. */ printf("%d\n", answer); return 0; }