#ifndef circuit_hpp_INCLUDED #define circuit_hpp_INCLUDED enum gate_type {And, Xor, Majority, HA, FA}; const std::string gate_type[5] = {"and", "xor", "majority", "HA", "FA"}; struct circuit { vec to; int sz, outs, type, neg, carrier; circuit() : sz(0), outs(0), type(0), neg(0), carrier(0) {} void push(int x) { to.push(x); sz++; } int &operator [] (int index) { return to[index]; } const int& operator [] (int index) const { return to[index]; } }; #endif