/* * Solution Template for Discount Destinations * * 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 travel days. */ int N; /* K is the window length and D is its spending cap. */ int K; int D; /* A contains the undiscounted daily costs. The array starts from 0. */ int A[200005]; long long answer; int main(void) { int i; /* Read N, K, D, and the daily costs. */ scanf("%d%d%d", &N, &K, &D); for (i = 0; i < N; i++) { scanf("%d", &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 total amount actually paid and store it in answer. */ /* Write the answer. */ printf("%lld\n", answer); return 0; }