noodlze's blog

By noodlze, history, 5 years ago, In English

This is is a problem from the 2011 USP Try-outs(http://codeforces.com/gym/101081/problem/I) and I cannot view my output for the test cases. I saw it as a job sequencing problem and solved it using greedy. But I am getting TLE on test case 35: http://codeforces.com/gym/101081/submission/21429116. Is my approach wrong? The time limit should be ample for 1<= n <= 10^5 hence I don't understand why I am getting TLE? Any helps would be highly appreciated! Thanks

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Use Priority Queue to solve.