#include <iostream>
#include <map>

#include <boost/optional.hpp>

int main()
{
    const std::map<int, boost::optional<double>> distanceToIdMap =
    {
    	{0, boost::none},
        {100, 8.4},
        {200, 7.2},
        {300, 3.6},
        {400, boost::none},
        {600, 4.1}
    };

    for (auto v : {-10, 50, 99, 100, 101, 250, 350, 500, 601})
    {
    	auto it = distanceToIdMap.lower_bound(v);
    	
    	if (it != distanceToIdMap.end() && it->second) {
    		std::cout << v << " " << *it->second << std::endl;
    	} else {
    		std::cout << v << " None" << std::endl;
    	}
    }
}