min-cost flow using spfa with negative weights