Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

[Idea] Using HLD to reduce memory

Revision en2, by maomao90, 2023-03-02 19:01:59

Recently when I was doing Universal Cup Round 5, I got stuck a tree problem A as I realised that my solution required way too much memory. However, after the contest, I realised that there was a way that I can reduce a lot of memory using HLD. So here I am with my idea...

Tags hld, memory

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en10 English maomao90 2024-04-07 12:31:56 126 Tiny change: '.\n\n[cut]\n\n# Opti' -> '.\n\n[cut] \n\n# Opti'
en9 English maomao90 2023-03-04 03:27:10 27 Tiny change: '\n ' -> '\n sub[u] += sub[v];\n '
en8 English maomao90 2023-03-03 13:23:19 23 Tiny change: '\n ' -> '\n getSub(v, u);\n '
en7 English maomao90 2023-03-03 09:50:46 21
en6 English maomao90 2023-03-03 09:32:29 36
en5 English maomao90 2023-03-03 07:51:24 1506 (published)
en4 English maomao90 2023-03-03 07:12:35 132
en3 English maomao90 2023-03-03 07:11:07 3083 Tiny change: 'uires $O(N|S|)$ memo' -> 'uires $O(N\cdot |S|)$ memo'
en2 English maomao90 2023-03-02 19:01:59 153
en1 English maomao90 2023-03-02 19:00:27 222 Initial revision (saved to drafts)