Is this something we want? https://github.com/Laakeri/contestlib/blob/master/src/graph/circulation.cpp