Create maxWeightIntervals.cpp