#pragma once #include #include "ipasir.h" class Graph { public: struct Edge { int from; int to; int neg; }; std::vector> edge; std::vector> redge; void add(int u, int v, int w) { edge.resize(std::max(std::max(u, v)+1, (int)edge.size())); redge.resize(std::max(std::max(u, v)+1, (int)redge.size())); edge[u].push_back(Edge{u, v, w}); redge[v].push_back(Edge{v, u, w}); } }graph; std::map topo_index; std::set> eqp; std::set eqn; std::vector> eqs; std::vector> classes; std::vector> > pairs;