0

Didn't get the third condition. Can anyone explain?

https://codeforces.com/contest/1325/problem/C

15th Mar 2020, 6:45 AM
R_N
5 Respuestas
+ 3
R_C my java is poor😔 but the labels of nodes have no meaning. Call them a, b, c if u want.
15th Mar 2020, 11:39 AM
Oma Falk
Oma Falk - avatar
+ 2
from node1 to node5 you have to walk edges 0 and 4. lowest label of none walked edge is 1. mex(1,5)=1 --> example of picture
15th Mar 2020, 11:13 AM
Oma Falk
Oma Falk - avatar
+ 2
Oma Falk I'm using different approach. First assigning label to leaves (0,1,2,..) then assigning labels to nodes left.
15th Mar 2020, 11:26 AM
R_N
+ 1
Why this code giving tle https://code.sololearn.com/cbYV0pwfHt6d/?ref=app My approach is first assigning numbers from 0 to all the leaves then the left node assigned
15th Mar 2020, 11:04 AM
R_N
+ 1
Oma Falk Issue with Scanner class 😕. Used BufferedReader.. Got accepted
15th Mar 2020, 11:43 AM
R_N