Submission #720701

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7207012023-04-09 03:48:22joelgun14Race (IOI11_race)C++17
100 / 100
413 ms93016 KiB
#include "race.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int l;
int res = 1e9;
const int lim = 2e5 + 5;
int depth[lim];
bool vis[lim];
vector<pair<int, int>> edges[lim];
struct disjoint_set {
int h[lim], sz[lim], d[lim];
ll shift[lim];
// fi -> distance
// se -> depth
// cari depth terkecil
set<pair<int, int>> a[lim];
disjoint_set() {
memset(h, -1, sizeof(h));
//memset(sz, 0, sizeof(sz));
fill(sz, sz + lim, 1);
memset(shift, 0, sizeof(shift));
memset(d, -1, sizeof(d));
}
int fh(int nd) {
return h[nd] == -1 ? nd : h[nd] = fh(h[nd]);
}
bool merge(int x, int y) {
x = fh(x), y = fh(y);
if(x != y) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...