接下來n行,每行四個整數(shù),第i行的數(shù)字: vi, ci,li ,ri ,(1< =vi< =10^4 , 1< =ci< =10^5,0< =li,ri< =10^5),車子們從1開始編號,從車隊的最前頭開始算起。
數(shù)據(jù)規(guī)模和約定
對于20%的數(shù)據(jù),n< =100
對于50%的數(shù)據(jù),n< =1000
對于100%的數(shù)據(jù),n< =100000
對于100%的數(shù)據(jù),1< =vi< =10^4 , 1< =ci< =10^5,0< =li,ri< =10^5
5 1 1 0 3 1 1 1 2 1 1 2 1 1 1 3 0 2 1 3 0
4 1 2 3 5