pure's blog

By pure, history, 3 months ago, In English

Same as title, I wanted to know whether everyone is facing this issue or not. I tried from my friend's account, used VPN, changed browsers, cleared cookies but nothing helped. The practice section works fine but theory section does not load and gives a timeout with error: What happened?

The origin web server timed out responding to this request.

The likely cause is an overloaded background task, database or application, stressing the resources on the host web server.

@MikeMirzayanov It would be grateful if you can look into this issue

Full text and comments »

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

By pure, history, 7 months ago, In English

First of all I am new to trees and graphs so sorry in advance if I make any silly mistakes.

I was trying to do this question greedily as follows: I first initialized a deque res and set of integers inserted which says that certain input is already processed. for input u, v, x, y if u does not exist in inserted if x > y then I push u to front of res else to the back if v does not exist in inserted if x > y then I push v to back of res else to the front and then using res I created the vector finalres such that finalres[res[0] — 1] = n, finalres[res[1] — 1] = n — 1, ...

This approach does obivously seem wrong (eg, 1 4 1 2 2 1 3 4 2 1 1 3 2 1 ) which will give 3 2 4 1 which is wrong as 3 < 4

The code was accepted to my shock but not only that the code which I thought to be correct was not accepted. Link for accepted code: https://mirror.codeforces.com/contest/2143/submission/339152761 Link for the code which I thought should be accepted: https://mirror.codeforces.com/contest/2143/submission/339142596 The reason I think the second code should be accepted is because it passes through all the edges of a certain number before going ahead so the above issue would not be caused.

I would be grateful if anyone could help me understand what is going on.

Full text and comments »

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

By pure, history, 8 months ago, In English

Yesterday, in Codeforces Round 1045 when I submitted the solutions for A and B it took around 5 minutes for both to test whether it passed the pretests or not. I wanted to know is it only for me because it was the first time I faced such an issue. Are there any workarounds like using mirror website (like m1.codeforces.com) which can help?

Full text and comments »

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