How do you like your trees?

Правка en3, от HexShift, 2023-09-23 04:05:34

Do you personally prefer tree problem with $$$N-1$$$ pair of integers input where $$$i^{th}$$$ input ($$$u_i$$$ and $$$v_i$$$) denotes the nodes that $$$i^{th}$$$ edge connects and all the edges guarantee a tree, or $$$N-1$$$ integers input where $$$i^{th}$$$ input ($$$p_i$$$) indicates that there is an edge that connects node $$$i+1$$$ to node $$$p_i$$$ and all the edges also guarantee a tree (usually this comes with the $$$1 \leq p_i \leq i$$$ constraint to do that)? I personally prefer the latter.

Теги input reading, tree

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский HexShift 2023-09-23 04:05:34 7
en2 Английский HexShift 2023-09-23 04:04:55 54
en1 Английский HexShift 2023-09-23 03:58:08 439 Initial revision (published)