fixed bug in sa.cpp and it now works great with faster greedy.cpp