Stores the minimum and maximum day in the ranges
min_day = ranges [ 0 ] [ 0 ] NEW_LINE max_day = 0 NEW_LINE for i in range ( N ) : NEW_LINE max_day = max ( max_day , ranges [ i ] [ 1 ] ) NEW_LINE index , count_jobs = 0 , 0 NEW_LINE