#include <functional> #include <algorithm> #include <iostream> #include <iterator> #include <sstream> #include <fstream> #include <numeric> #include <iomanip> #include <climits> #include <utility> #include <complex> #include <cstdlib> #include <cstring> #include <cassert> #include <string> #include <vector> #include <cctype> #include <bitset> #include <cstdio> #include <cmath> #include <ctime> #include <deque> #include <stack> #include <queue> #include <deque> #include <list> #include <new> #include <map> #include <set> using namespace std; //#pragma comment(linker, "/STACK:102400000,102400000") typedef long long LL; typedef pair<int, int> PII; typedef pair<PII, int> PIII; typedef vector<int> vec; typedef vector<vec> mat; #define PB push_back #define MP(a, b) make_pair(a, b) #define FI first #define SE second #define gcd(x, y) __gcd(x, y) #define gcd3(x, y, z) __gcd(__gcd(x, y), z) const double EPS = 1e-8; const double PI = acos(-1.0); const int INF = 0x3f3f3f3f; const LL INFL = 0x3f3f3f3f3f3f3f3fLL; const int MAXN = 100000 + 10; const int MOD = 1000000007;