Happy Coding

This blog is for my memorandum.

Happy Coding

This blog is for my memorandum

UnionFind

Union Find Tree SRM 703 Middium GCDGraph

Problem Statement You are given four s: n, k, x, and y. The s n and k describe a simple undirected graph. The graph has n nodes, numbered 1 through n. Two distinct vertices i and j are connected by an edge if and only if gcd(i, j) > k. Her…