Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

USACO newbarn

Правка en3, от dx24816, 2018-09-11 06:41:25

Hello,

Can someone explain the solution to USACO newbarn (Problem: http://www.usaco.org/index.php?page=viewproblem2&cpid=817, Solution: http://www.usaco.org/current/data/sol_newbarn_platinum_feb18.html)? I don't understand what his variables names mean, like tree[c].top, tid, etc. Can someone explain what all of his variables mean and how each part of his program works, including his centroid decomposition? Thanks!

Edit: OK, if anyone has a centroid decomposition solution that's not the official solution (I can't understand how the checking for the same subtree idea works), can you post it and explain it in depth?

-dx24816

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский dx24816 2018-09-11 06:43:08 128
en3 Английский dx24816 2018-09-11 06:41:25 206
en2 Английский dx24816 2018-09-08 18:34:58 39
en1 Английский dx24816 2018-09-08 18:06:41 411 Initial revision (published)