problem: (F) Beautiful fountains rows Solve In C/C++ Archive

Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (F) Beautiful fountains rows Solution In C/C++

Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2), problem: (F) Beautiful fountains rows Solution In C/C++

include<cstdio> using namespace std; inline int read(){ char c=getchar();int p=1,ret=0; while((c<'0')||(c>'9')){if(c=='-')p=-1;c=getchar();} while((c>='0')&&(c<='9'))ret=(ret<<1)+(ret<<3)+c-'0',c=getchar(); return ret*p; } int n,m; long long ans; struct tree{ int v,num; long long sum; void add(int x,int y,int p){v+=p;} }t; struct ele{ …