/* * Solution Template for Prime Minister * * Australian Informatics Olympiad 2026 * * 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 citizens and K is the money available. */ int N; long long K; /* * A contains the citizens' initial wealth in sorted order. The array starts * from 0. */ long long A[200005]; long long answer; int main(void) { /* Read N, K, and the initial wealth values. */ scanf("%d%lld", &N, &K); for (int i = 0; i < N; i++) { scanf("%lld", &A[i]); } /* * Please note that the answer may exceed the maximum value * that can be stored in an "int" integer type. * Because of this, you should use the "long long" integer type * instead of "int" when computing your solution. */ /* TODO: Compute the maximum possible median wealth and store it in answer. */ /* Write the answer. */ printf("%lld\n", answer); return 0; }