-
1
-
2
-
3
-
4
-
5
fj plcd n boxes vrtcs rtd tree,nmbrd 1 n,1<=n<=10000.ntlly,each box cntnd xctly one mrbl.nfrtntly,mschvs elsie moved mrbls rnd,boxes empty cntn one mrbl,total nmbr mrbls still n.bss dcdd help fj mvng mrbls such each box cntns xctly one mrbl again.ccmplshd sqnc moves,each move cnssts mvng one mrbl box djcnt vrtx.mnmm nmbr moves rqrd bss chv goal.ipf each case strts nmbr n fllwd n lines.each line cntns least three nmbrs,1<=v<=n,nmbr vrtx.vrtcs nmbrd 1 n,given ncrsng order ipt.0<=m<=n,nmbr mrbls rgnlly plcd vrtx v.0<=d<=n-1, nmbr chldrn v.same line,fllw d dstnct vrtx nmbrs gvng dntts chldrn v.opf each case,opt smllst nmbr moves mrbls rsltng one mrbl each vrtx tree
Original length: 1103
Compressed length: 330
Percent compression: 70.0816%
�f��p����v��:��n]_���ӻ<�����-o{�w5�j���m^��,>�)�wCg�VJ��8-3�|+��'{;�C��~���n��q���u��s��'��3O�ơY��\}7t�3��8z���q]��o��z.Up��7s�b4�v���u=�b ���Ѝ^?ב�q�m\ׇd$|OĒ'�K��qh���qh6�L�q{y�m\�wC�(N�k�]�ϼ�[��,W"w3G�M�{A:��J[ji���~gwѸ�o�"8�F��sC�SXf{����c
�<�Z+��VJ��[q�=��f��ʗ*ZM��?���[㺞+�ݏ���Zi��