# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1165633 | SmuggingSpun | 자매 도시 (APIO20_swap) | C++20 | 0 ms | 0 KiB |
#include<bits/stdc++.h>
#include "swap.h"
using namespace std;
template<class T>void minimize(T& a, T b){
if(a > b){
a = b;
}
}
template<class T>void maximize(T& a, T b){
if(a < b){
a = b;
}
}
const int lim = 1e5 + 5;
const int INF = 1e9;
bool is_sub2;
int n, m, u[lim << 1], v[lim << 1], w[lim << 1];
vector<int>g[lim];
namespace sub2{
int third;
void init(){
vector<int>p(n - 1);
iota(p.begin(), p.end(), 1);
sort(p.begin(), p.end(), [&] (int i, int j){
return w[g[i][0]] < w[g[j][0]];
});
if(n > 3){
third = p[2];
}
}