Don't try to simulate the scheduler on every second. The total execution time can reach 50000 * 10^9 sec. Play with small examples, get the task list in execution order, and find the cyclic property of the list.
You can solve this problem in O(N) time complexity.

On 2010-6-20 18:15, Shravan wrote:
Theres a link to the code on the third post.

On Jun 20, 3:07 pm, Rohit Saraf<[email protected]>  wrote:
No
--------------------------------------------------
Rohit Saraf
Second Year Undergraduate,
Dept. of Computer Science and Engineering
IIT Bombayhttp://www.cse.iitb.ac.in/~rohitfeb14

On Sun, Jun 20, 2010 at 3:22 PM, Shravan<[email protected]>  wrote:
Did you see the code which I have posted.
On Jun 20, 2:31 pm, Rohit Saraf<[email protected]>  wrote:
You must be doing some useless iterations . Otherwise, TLE is too strange
for this prob.
--------------------------------------------------
Rohit Saraf
Second Year Undergraduate,
Dept. of Computer Science and Engineering
IIT Bombayhttp://www.cse.iitb.ac.in/~rohitfeb14
On Sat, Jun 19, 2010 at 9:15 AM, Shravan<[email protected]>  wrote:
Even I have implemented it using arrays, but I am getting a TLE.
Here's the code
http://ideone.com/EfYRa
On Jun 19, 8:15 am, Anand<[email protected]>  wrote:
It can be done using simple array data structure why do we need
complex
data
structure.
Here is how I did. Let me know if I understood correctly.
http://codepad.org/rMbTI8PJ
On Fri, Jun 18, 2010 at 8:15 AM, Shravan<[email protected]>
wrote:
I am trying to solve the problemhttp://
www.spoj.pl/problems/RRSCHED/
. And a naive approach doesn't seem to work .What sort of data
structure do I need.
--
You received this message because you are subscribed to the Google
Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected]<algogeeks%[email protected]>
<algogeeks%[email protected]<algogeeks%[email protected]>
<algogeeks%2bunsubscr...@googlegroups .com>
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
You received this message because you are subscribed to the Google
Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected]<algogeeks%[email protected]>
<algogeeks%[email protected]<algogeeks%[email protected]>
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected]<algogeeks%[email protected]>
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.

--
You received this message because you are subscribed to the Google Groups "Algorithm 
Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to