제출 #535991

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
5359912022-03-12 03:28:10dutinmeow자매 도시 (APIO20_swap)C++17
100 / 100
359 ms45528 KiB
#include <bits/stdc++.h>
using namespace std;
//#include "swap.h"
const int LOGN = 19;
vector<int> dep, val;
vector<bool> lin;
vector<array<int, LOGN>> anc;
void init(int N, int M, vector<int> U, vector<int> V, vector<int> W) {
//auto start = chrono::high_resolution_clock::now();
vector<tuple<int, int, int>> E(M);
for (int i = 0; i < M; i++)
E[i] = {U[i], V[i], W[i]};
sort(E.begin(), E.end(),
[](const auto &a, const auto &b) {
return get<2>(a) < get<2>(b);
}
);
struct node {
int par, val, com; bool lin;
node() = default;
node(int _par, int _val, int _com, bool _lin) : par(_par), val(_val), com(_com), lin(_lin) {}
};
vector<node> T;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...