제출 #898339

#제출 시각아이디문제언어결과실행 시간메모리
8983398pete8Meetings (JOI19_meetings)C++17
0 / 100
1722 ms5096 KiB
#include "meetings.h" #include<iostream> #include<stack> #include<map> #include<vector> #include<string> #include<unordered_map> #include <queue> #include<cstring> #include<float.h> #include<limits.h> #include <cassert> #include<cmath> #include<set> #include<algorithm> #include <iomanip> #include<numeric> //gcd(a,b) #include<bitset> using namespace std; #define ll long long #define f first #define endl "\n" #define s second #define pii pair<int,int> #define ppii pair<int,pii> #define vi vector<int> #define pb push_back #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define F(n) for(int i=0;i<n;i++) #define lb lower_bound #define ub upper_bound using namespace std; //#define int long long //#define double long double const int mod=998244353,mxn=2e3,lg=22;//inf=1e18,minf=-1e18,Mxn=100000; int q[mxn+10][mxn+10]; void Solve(int n){ vector<pii>v(n-1,{0,0}); for(int i=1;i<n;i++){ v[i-1].s=i; for(int j=1;j<i;j++){ q[i][j]=Query(0,j,i); q[j][i]=q[i][j]; if(q[i][j])v[q[i][j]-1].f++; } } sort(rall(v)); for(int i=0;i<n-1;i++){ int p=0; for(int j=0;j<i;j++)if(q[v[i].s][v[j].s]==v[j].s)p=v[j].s; Bridge(min(p,v[i].s),max(p,v[i].s)); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...