[algogeeks] Re: Round Robin Schedulling Problem

2011-05-26 Thread vishwakarma
@Anshuman sir There is mistake in above code : u wrote -- ans[IN[i]] = curtime + (D[i] - last - 1) * rem + (i - L[IN[i]] + 1); I think it should be -- ans[IN[i]] = curtime + (D[i] - last - 1) * rem + (IN[i]- L[IN[i]] + 1); correct me if i m wrong On May 26, 9:17 am, anshu mishra

[algogeeks] Re: Round Robin Schedulling Problem

2011-05-26 Thread vishwakarma
wait !! wait !! @Anshuman sir...u have left few case ; I corrected ur code and got accepted at spoj. Here is the correct code; //here F[] is array which got 3 fields ( element value(same as ur D[] array) , its index in original input(same as ur IN[] array) , number of elements less than it till

Re: [algogeeks] Re: Round Robin Schedulling Problem

2011-05-26 Thread anshu mishra
@gopi by mistake i have written i in place of IN[i]; my fault, 2nd thing( (F[i].idx - F[i-1].idx - (F[i].rep - F[i-1].rep) ) i have really not think of that. thanks :) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group,