00x3f00f3x's blog

By 00x3f00f3x, history, 4 years ago, In English

Hello everyone. Recently I've explored a better solution O(N*logN) instead of O(N^2) for 13C (Sequences) using Priority Queue: https://mirror.codeforces.com/contest/13/submission/94130902. But I can't understand why it is work. Can somebody explain the main idea of O(N*logN) solution for me? Thanks so much.

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