#include #include #include #include #include #include #include long int maximumPeople(int p_size, long int* p, int x_size, long int* x, int y_size, long int* y, int r_size, long int* r) { // Return the maximum number of people that will be in a sunny town after removing exactly one cloud. // *p = population and *x is location of town and y_size is number of cloud covering and *y = location of cloud and *r = range of cloud int i; int j; int max = 0; //max people affected long int new[p_size]; for(i=0;i=a && j<=b) { localMax += p[k]; new[k] = -1; } k++; } if(localMax>max) max = localMax; } for(i=0;i