#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; void fre() { freopen("c://test//input.in", "r", stdin); freopen("c://test//output.out", "w", stdout); } #define tmpmtmps(x,y) memset(x,y,sizeof(x)) #define tmpmC(x,y) memcpy(x,y,sizeof(x)) #define tmpmP(x,y) make_pair(x,y) #define ls o<<1 #define rs o<<1|1 typedef long long LL; typedef unsigned long long UL; typedef unsigned int UI; template inline void gmax(T1 &a, T2 b) { if (b>a)a = b; } template inline void gmin(T1 &a, T2 b) { if (b