binary_search, spfa