im_115's blog

By im_115, history, 2 years ago, In English

Problem link — 1354D - Multiset
Solution link — 143561353

I am using segment tree. The time complexity of the code is O( n * ( (logN)^2 ) ) which should pass the time limit. I am also using ios_base::sync_with_stdio(0);cin.tie(0); for fast IO.

Full text and comments »

  • Vote: I like it
  • -6
  • Vote: I do not like it

By im_115, history, 2 years ago, In English

Problem link — 20C - Алгоритм Дейкстры?
Solution with custom comparator (give MLE) — 142440675
Solution without comparator (Accepted) — 142444892
The logic of both the solutions are same (Dijkstra). Only the implementation is different. Why does using a custom comparator give MLE?

Full text and comments »

  • Vote: I like it
  • -9
  • Vote: I do not like it