Codeforces Round #419 (Div. 1), problem: (D) Karen and Cards Solution In C/C++

By | 2017-08-07T21:44:43+00:00 August 7th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , , |

#include <bits/stdc++.h> #define ll long long using namespace std; const int N = 500010; ll maxn[N<<2],minn[N<<2],sum[N<<2]; int n,p,q,r,tot=1,x[N],y[N],z[N]; ll ret=0; vector<int> c[N]; void update(int a,int b,int x,int l,int r,int i) { if(a>r || l>b || minn[i]>x) return; if(a<=l && r<=b && maxn[i]<=x) { maxn[i]=minn[i]=x; [...]