NaiveGreedy now uses precomputed distances