Ashish's blog

By Ashish, history, 4 months ago, In English,

Hey there,
Problem
My Solution
I wrote a solution which uses priority queue and pops the maximum element until the sum of elements inside the priority queue is greater than (m-ti) for all 1<=i<=n, so the running time (according to me) is n*logn*max(ti) as at every pop operation the sum will reduce by atleast 1 (1<=ti<=100), logn for priority queue operations and total of n students.
When I submitted the code, it gave me TLE on test #14.
Any help is appreciated.
Thank You.

Read more »

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

By Ashish, history, 9 months ago, In English,

Why is this code for this problem getting a TLE verdict. The sum of the size of the vector during individual sorts would never exceed 2*10^5. I did the same thing here and got an AC verdict.

Read more »

 
 
 
 
  • Vote: I like it
  • +1
  • Vote: I do not like it

By Ashish, history, 12 months ago, In English,

Hey there, I tried submitting solution to 1064D during the contest. My solution can be found here. As many of you might have noticed the solution is incorrect, I was expecting WA verdict but got RTE (on pretest 8 to be precise). I tried searching a lot but could not figure out why it was RTE and not WA. The exit code was -1073741571 if it helps.Can anyone help me with the solution(Not solution to the problem but why there was a RTE verdict). Thank You

Read more »

 
 
 
 
  • Vote: I like it
  • +4
  • Vote: I do not like it

By Ashish, history, 13 months ago, In English,

Hey there, I was trying to solve A.Alphacode of this contest. My solution is here I am getting WA on test case 2. The question is pretty straightforward and hence I am not able to determine where my solution is failing. Any help would be appreciated.

Read more »

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