# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1130542 | I_FloPPed21 | Evacuation plan (IZhO18_plan) | C++20 | 616 ms | 28912 KiB |
#include <iostream>
#include <algorithm>
#include <queue>
using namespace std;
const int N=2e5+1;
int n,m;
vector<pair<int,int>>adj[N];
int dp[N];
vector<pair<int,int>>muchii;
int dsu[N];
struct query
{
int a,b;
int st,dr,mij,ind;
int ans;
} qr[N];
int get(int x)
{
int nod1=x;
while(dsu[nod1]>0)
{
nod1=dsu[nod1];
}
while(dsu[x]>0)
{
int mid=dsu[x];
dsu[x]=nod1;
x=mid;
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |