3
double eucDis(int x1, int y1, int x2, int y2) {4
double temp = pow(x1 - x2, 2) + pow(y1 - y2, 2);7
void dfs(int node, vector<int> &vis, vector<int> graph[], int &c) {10
for (auto i : graph[node]) {12
dfs(i, vis, graph, c);16
int maximumDetonation(vector<vector<int>> &bombs) {18
vector<int> graph[n + 1];20
for (i = 0; i < n; i++) {21
bombs[i].push_back(i);23
for (i = 0; i < n; i++) {24
for (j = 0; j < n; j++) {26
double dis1 = eucDis(bombs[i][0], bombs[i][1], bombs[j][0], bombs[j][1]);28
if (dis1 <= bombs[i][2]) {29
int node1 = bombs[i][3];30
int node2 = bombs[j][3];31
graph[node1].push_back(node2);37
for (i = 0; i < n; i++) {39
if (graph[i].empty()) continue;40
vector<int> vis(n + 1, 0);42
dfs(i, vis, graph, c);