Didn't get the third condition. Can anyone explain? | Sololearn: Learn to code for FREE!

0

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

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

3/15/2020 6:45:41 AM

R_N

5 Answers

New Answer

+3

R_C my java is poor๐Ÿ˜” but the labels of nodes have no meaning. Call them a, b, c if u want.

+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

+2

Oma Falk I'm using different approach. First assigning label to leaves (0,1,2,..) then assigning labels to nodes left.

+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

+1

Oma Falk Issue with Scanner class ๐Ÿ˜•. Used BufferedReader.. Got accepted