# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
347064 | andrii | Evacuation plan (IZhO18_plan) | C++14 | 1404 ms | 44788 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// -- //
#include <bits/stdc++.h>
#define pll pair<ll, ll>
#define x first
#define y second
using namespace std;
typedef long long ll;
const ll N = 1e5+228;
vector<pll> d[N];
vector<pll> edges;
ll aes[N];
bool is_aes[N];
ll was[N], wc=0;
ll len_aes[N];
ll qa[N], qb[N], ql[N], qr[N];
ll dsu[N];
ll _f(ll v){
return dsu[v]==v?v:dsu[v]=_f(dsu[v]);
}
void _u(ll a, ll b){
a=_f(a), b=_f(b);
if(a==b) return;
dsu[b]=a;
}
signed main(){
cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(0);
ll n, mm, k, q;
cin >> n >> mm;
for(ll a, b, c, i=0;i<mm;i++){
cin >> a >> b >> c;
# | 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... |