polycarp start business tomorrow work day car repair shop for car repair shop small car repair give timepolycarp good marketing collect n request client the request number 1 n order camethe ith request characterize value si day client want start repair car di duration day repair car the day enumerate 1 day tomorrow second day day tomorrow onpolycarp make schedule processing request order nth request he schedule ith request follow if car repair shop idle di day start si sisi1sidi1 day repair car ith client Otherwise Polycarp find day x 1 di subsequent day repair schedule start x in word choose small positive x day xx1xdi1 schedule repair car so car ith client repair range xxdi1 it possible day x repair schedule start si give n request ask help polycarp schedule accord rule