用并查集将距离小于等于k的点合并起来,最后找点最多的集合即可
c++
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
R市正在进行传染病防控。
R市总共有n个人。
具体的,每个人有一个位置(x,y),现在已知有一个是高风险人员,但还未追踪到具体是谁。
本题属于以下题库,请选择所需题库进行购买
Scan the QR code below with WeChat to sign in
First-time scan will create your account automatically
请使用微信扫描下方二维码完成注册