D&E线段树做法 #include <iostream> #include <iomanip> using namespace std; int a[200005]; struct elem { double val; int l,r; }; struct node { elem data, lazy; } tree[800005]; void pushup(elem &e, elem &e1, elem &e2) { e = {e1.val + e2.val, e1.l, e2.r}; } void build(i...