Exact solutions to the transportation problem on the line