Add sample/k_distance_main.cpp