// 建立线段树 private void build(int node, int left, int right){ if(left == right){ tree[node] = nums[left]; } int mid = left + ((left + right)>> 1); build(2*node + 1, left, mid); build(2*node + 2, mid + 1
import java.io.*;class Node {int l;int r;long sum;long add;long mul;public Node(int l, int r, long sum, long add, long mul) {this.l = l;this.r = r;this.sum = sum;this.add = add;this.mul = mul;}}public class Main {static BufferedWriter writer = new BufferedWriter(new Ou...