Skip to content

Instantly share code, notes, and snippets.

View ChemiCalChems's full-sized avatar

Txema Ynzenga ChemiCalChems

View GitHub Profile
#include <iostream>
#include <sstream>
#include <vector>
std::vector<std::string> split(const std::string &s, char delim) {
std::vector<std::string> elems;
std::stringstream ss;
ss.str(s);
std::string item;
while (std::getline(ss, item, delim)) {
#include <iostream>
#include <vector>
enum Wire {white, black, purple, red, green, orange};
struct State {
virtual bool cut(Wire wire) {return true;}
};
struct WhiteCutState : State {