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

Method TwoSat

code/other/two_sat.cpp:4–7  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2struct TwoSat {
3 int n, at = 0; vi S;
4 TwoSat(int _n) : n(_n) {
5 rep(i,0,2*n+1)
6 V[i].adj.clear(),
7 V[i].val = V[i].num = -1, V[i].done = false; }
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) {

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected