Update directed_cycle.cpp