#include <map> #include <set> #include <cmath> #include <queue> #include <stack> #include <bitset> #include <cstdio> #include <string> #include <vector> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> #include <functional> using namespace std; #define rep(i,a,n) for (int i=a;i<n;i++) #define per(i,a,n) for (int i=n-1;i>=a;i--) #define all(x) (x).begin(),(x).end() #define pb push_back #define mp make_pair #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|1 typedef long long ll; typedef vector<int> VI; typedef pair<int, int> PII; const ll MOD = 1e9 + 7; const int INF = 0x3f3f3f3f; const int MAXN = 2e9 + 7; // head