It has been asked before on the same/similar challenge.
The problem is to create correct polygons. Caches between the lanes is not allowed. There is no description about caches abowe the lanes, I dont know if that is include in the between lanes.
Anyway polygon on the inside or outside of the lanes are requires and has to be crated, open street map polygons are in the middle of the lane and cant be used.
It they are create a checker can be written but I am not sure it will be fast enough
This assume that the highway is an single lane in each direction. If there are parts with multiple parts that is include it is a harder problem