제출 #131535

#제출 시각아이디문제언어결과실행 시간메모리
131535KewoMeetings (JOI19_meetings)C++17
17 / 100
25 ms1016 KiB
#include "meetings.h" #include <bits/stdc++.h> #define fi first #define se second #define pb push_back #define ppb pop_back #define mid ((x + y) / 2) #define left (ind * 2) #define right (ind * 2 + 1) #define spc " " #define endl "\n" #define fast_io() cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(false) using namespace std; typedef pair<int, int> ii; typedef long long int lli; const int N = (55); const int LOG = (20); int adj[N][N], call; vector<int> btw[N][N]; void Solve(int N) { for(int i = 0; i < N; i++) for(int j = i + 1; j < N; j++) for(int k = j + 1; k < N; k++) { int res = Query(i, j, k); if(res == i) { btw[j][k].pb(i); btw[k][j].pb(i); } if(res == j) { btw[i][k].pb(j); btw[k][i].pb(j); } if(res == k) { btw[i][j].pb(k); btw[j][i].pb(k); } } for(int i = 0; i < N; i++) for(int j = i + 1; j < N; j++) if(btw[i][j].size() == 1) { int node = btw[i][j][0]; adj[i][node] = 1; adj[node][i] = 1; adj[j][node] = 1; adj[node][j] = 1; } for(int i = 0; i < N; i++) for(int j = i + 1; j < N; j++) if(adj[i][j]) Bridge(i, j); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...