이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |