MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / add_or

Method add_or

code/other/two_sat.cpp:10–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8 bool put(int x, int v) {
9 return (V[n+x].val &= v) != (V[n-x].val &= 1-v); }
10 void add_or(int x, int y) {
11 V[n-x].adj.push_back(n+y), V[n-y].adj.push_back(n+x); }
12 int dfs(int u) {
13 int br = 2, res;
14 S.push_back(u), V[u].num = V[u].lo = at++;

Callers 1

iterFunction · 0.80

Calls 1

push_backMethod · 0.80

Tested by 1

iterFunction · 0.64