#include using namespace std; typedef long long ll; #define P pair #define pub push_back #define pob pop_back #define mp make_pair #define nl '\n' //new line #define mset multiset #define lb lower_bound #define rep(i,n) for(ll i=0;i<(ll)(n);++i) template bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;} template bool chmax(T& a,T b){if(a>q; if(q==0) r=m; } }