#include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int m, n; cin >> n; int p[n], x[n]; for(int i=0; i> p[i]; for(int i=0; i> x[i]; cin >> m; int y[n], r[n]; for(int i=0; i> y[i]; for(int i=0; i> r[i]; int cPop[m], sunny = 0, max; for(int i=0; i= y[i]-r[i] && x[j] <= y[i]+r[i]) cPop[i] = cPop[i] + p[j]; else sunny = sunny + p[j]; } } max = cPop[0]; for(int i=1; i