programming-team-code / programming_team_code_rust

rustaceans
Creative Commons Zero v1.0 Universal
2 stars 0 forks source link

Compress tree #83

Open lrvideckis opened 2 weeks ago

lrvideckis commented 2 weeks ago

for testing, I found this https://github.com/suisen-cp/cp-library-cpp/blob/main/test/src/number/stern_brocot_tree/abc273_h.test.cpp#L41 but that seems too complicated for me

So I'm gonna test on this problem https://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_5_B with solution like:

  1. find diameter
  2. for each node u: build aux_tree with nodes {diam endpoint 1, diam endpoint 2, node), and then do maybe like a bfs on aux tree