MCPcopy Create free account
hub / github.com/atcoder/ac-library / same

Method same

atcoder/dsu.hpp:30–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 }
29
30 bool same(int a, int b) {
31 assert(0 <= a && a < _n);
32 assert(0 <= b && b < _n);
33 return leader(a) == leader(b);
34 }
35
36 int leader(int a) {
37 assert(0 <= a && a < _n);

Callers 5

mainFunction · 0.80
TESTFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64