/* * Solution Template for Wheeling and Dealing * * Australian Informatics Olympiad 2023 * * 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 candidates. */ int N; /* M is the number of voters. */ int M; /* * V contains the voters plans. Note that here the voters are numbered starting * from 0. */ int V[100005]; /* * P contains the amount of money that you can pay each voter to change their * vote. Note that here the voters are numbered starting from 0. */ int P[100005]; int answer; int main(void) { int i; /* Read the values of N, M, V and P. */ scanf("%d%d", &N, &M); for (i = 0; i < M; i++) { scanf("%d", &V[i]); } for (i = 0; i < M; i++) { scanf("%d", &P[i]); } /* * TODO: This is where you should compute your solution. Store the minimum * amount of money that you must pay so that candidate 1 wins into the * variable answer. */ /* Write the answers. */ printf("%d\n", answer); return 0; }