线段树模板(求最大最小)
#include<cstdio>const int INF = 0xffffff0;const long long IINF = 1e18;int minV = INF;int maxV = -INF;int max(int &a, int &b){ return a > b ? a : b;}int min(int &a, int &b){ return a < b