#include #define all(a) a.begin(),a.end() #define len(a) (int)(a.size()) #define fir first #define sec second #define fi first #define se second #define mp make_pair #define pb push_back using namespace std; typedef pair pii; typedef long long ll; typedef long double ld; template bool umin(T &a, T b) { if (b < a) { a = b; return 1; } return 0; } template bool umax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } #ifdef KIVI #define DEBUG for (int _____DEBUG=1;_____DEBUG;_____DEBUG=0) #define LOG(...) prnt(#__VA_ARGS__" ::",__VA_ARGS__)< auto &prnt(Ts ...ts) { return ((cerr << ts << " "), ...); } #else #define DEBUG while (false) #define LOG(...) #endif const int max_n = 1000+10, inf = 1000111222; int col[max_n]; int n; int x[max_n]; int y[max_n]; int r[max_n]; bool is_edge(int a,int b) { return 1ll*(x[a]-x[b])*(x[a]-x[b])+1ll*(y[a]-y[b])*(y[a]-y[b]) == 1ll*(r[a]+r[b])*(r[a]+r[b]); } vector cur; void dfs(int now) { cur.pb(now); for (int wh=0;wh>n; for (int i=0;i>x[i]>>y[i]>>r[i]; } for (int i=0;i