#include<iostream> #include<cstdio> #include<string> #include<cstring> #include<algorithm> #include<cmath> #define ll long long using namespace std; ; ; struct edge{ int to; int nxt; }; ],col[maxn]; int cnt,head[maxn];…
#include<iostream> #include<cstdio> #include<string> #include<cstring> #include<algorithm> using namespace std; ; int n,a[maxn],b[maxn],c[maxn],rka[maxn],rkb[maxn],rkc[maxn]; bool visa[maxn],visb[maxn],visc[maxn]; int rk,rec;…