往区间上覆盖一次函数,做法是用线段树维护标记永久化. 每次都忘了线段树要4倍空间,第一次交总是RE,再这么手残的话考场上就真的要犯逗了. #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int p = 39989; int read(int &k) { k = 0; int fh = 1; char c = getchar(); for(; c &…
同上题. #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #define maxn 40000 using namespace std; ,ls[maxn<<],rs[maxn<<],cnt=; ]; ; ; struct seg { long long x1,y1,x2,y2,id; seg (long long x1,long lo…