Блог пользователя Ashish

Автор Ashish, история, 5 лет назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор Ashish, история, 6 лет назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

Автор Ashish, история, 6 лет назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

Автор Ashish, история, 6 лет назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится