/* * Solution Template for Buried Treasure * * 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 clues. */ int N; /* L is the number of locations. */ int L; /* * A and B contain clues. Note that the arrays start from 0, and so the first * clue is (A[0], B[0]) and the last clue is (A[N-1], B[N-1]). */ int A[200005]; int B[200005]; int answer; int main(void) { /* Read the values of N, L, and the clues. */ scanf("%d%d", &N, &L); for (int i = 0; i < N; i++) { scanf("%d", &A[i]); scanf("%d", &B[i]); } /* * TODO: This is where you should compute your solution. Store the number of * locations that are consistent with all N clues into the variable answer. */ /* Write the answer. */ printf("%d\n", answer); return 0; }