Capghep
Capghep
h>
#define MASK(k) (1LL << (k))
#define BIT(x, i) (((x) >> (i)) & 1)
#define __builtin_popcount __builtin_popcountll
#define __builtin_ctz __builtin_ctzll
#define For(i, a, b) for(int i = (int)(a); i <= (int)(b); ++i)
#define Fod(i, a, b) for(int i = (int)(a); i >= (int)(b); --i)
//#define int long long
#define ll long long
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);
#define whole(a) a.begin(), a.end()
#define vi vector<int>
#define pii pair<int, int>
#define pb push_back
#define fi first
#define se second
#define mirai ""
template<class X, class Y>
bool minimize(X& x, const Y& y) {
X eps = 1e-9;
if (x > y + eps) {
x = y;
return true;
}
else return false;
}
template<class X, class Y>
bool maximize(X& x, const Y& y) {
X eps = 1e-9;
if (x + eps < y) {
x = y;
return true;
}
else return false;
}
template<class T>
T Abs(const T& x) {
return (x < 0 ? -x : x);
}
const int INF = 1e9 + 7;
const ll oo = 1e18 + 7;
const int MAX = 1000005;
const int MOD = 1e9 + 7;
using namespace std;
int n;
int A[1010][1010];
vector <int> dinhke[100010];
bool visited[1111];
int righ[100010];
void out()
{
cout << -1;
exit(0);
}
struct node
{
int type, x, y;
};
vector<node> res;
bool match(int u)
{
if (visited[u]) return false;
visited[u] = true;
void reset () {
memset (bit, 0, sizeof bit);
}