WORTH's blog

By WORTH, history, 5 weeks ago, In English

I know the difference is not huge, but I was consistently getting similar results, so I thought of asking it.

I recently learned Kuhn's algorithm, and was solving this problem. (I know it's slow, so the TLE makes sense)

When I realised that we only need the edge from the bipartite part we're starting from, I modified the code accordingly:

  • Changed the adjacency list size from $$$l + r$$$ to $$$l$$$.
  • Only have edge from $$$a_i \rightarrow b_i$$$ and not in the other direction.

I was not expecting a huge time save, but to my surprise, the new code took more time in almost every big test case (one of the test case taking 600ms more time).

Submissions:

Previous

Modified

Am I overthinking, or is there some explanation to this?

Full text and comments »

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

By WORTH, history, 22 months ago, In English

In problem 1788D - Движущиеся точки

I faced MLE verdict in Test 1 194346234

It got accepted on removing the custom stack 194345608

I've been using this template for a while and never faced this problem. Can someone please explain why I'm getting MLE Verdict?

Full text and comments »

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