Submission #1311997

#TimeUsernameProblemLanguageResultExecution timeMemory
1311997samarthkulkarniRigged Roads (NOI19_riggedroads)C++20
0 / 100
51 ms8268 KiB
#include <bits/stdc++.h>
using namespace std;

using ll = long long;
#define vi vector<long long>
#define all(x) x.begin(), x.end()
#define endl "\n"
#define pr pair<ll, ll>
#define ff first
#define ss second

void solution();
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    solution();
    return 0;
}


struct DSU {
	ll n;
	vi rep, sz;
	DSU (ll _n) {
		n = _n;
		rep.resize(n+1);
		sz.resize(n+1, 1);
		iota(all(rep), 0);
	}

	int find(int a) {
		while (a != rep[a]) a = rep[a];
		return a;
	}

	bool isSame(int a, int b) {
		return find(a) == find(b);
	}

	void unite(int a, int b) {
		a = find(a);
		b = find(b);
		if (a == b) return;
		if (sz[a] < sz[b]) swap(a, b);
		rep[b] = a;
		sz[a] += sz[b];
	}
};



void solution() {
	ll n, m; cin >> n >> m;


	vector<pr> edge(m+1);
	for (int i = 1; i <= m; i++) {
		cin >> edge[i].ff >> edge[i].ss;
	}

	vi mst(n-1);
	for (ll &z : mst) cin >> z;

	for (int i = 1; i <= m; i++) cout << i << " ";




}
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...