Submission #1187728

#TimeUsernameProblemLanguageResultExecution timeMemory
1187728oviyan_gandhiMeetings (JOI19_meetings)C++20
0 / 100
1297 ms732 KiB
#include <bits/stdc++.h> #include "meetings.h" using namespace std; #define N 2001 set<int> path[N]; void Solve(int n) { for (int i = 1; i < n; i++) for (int j = 1; j < n; j++) if (i != j && Query(0, i, j) == j) path[i].insert(j); queue<int> q; for (int i = 1; i < n; i++) { if (path[i].empty()) { Bridge(0, i); q.push(i); } } while (!q.empty()) { int u = q.front(); q.pop(); for (int v = 1; v < n; v++) { if (path[v].empty()) continue; path[v].erase(u); if (path[v].empty()) { Bridge(u, v); q.push(v); } } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...