Page 1 of 1

Re: 1687 - Slicing Tree

Posted: Mon Feb 16, 2015 3:58 am
by morris821028
give some I/O

Input

Code: Select all

9999
 
 5
 1 5
 4 2
 3 3
 1 3
 5 4
 2 1 V 3 5 H 4 V H
 
 6
 4 2
 5 7
 7 2
 4 4
 1 4
 5 3
 2 3 H 1 5 V 6 4 H V V
 
 12
 2 5
 4 3
 4 2
 5 3
 2 4
 3 1
 2 6
 1 4
 4 2
 4 5
 7 8
 3 5
 1 2 H 3 4 H V 5 6 V H 7 8 H 9 10 H V 11 12 V H V
 
 3
 2 2
 3 1
 4 2
 3 1 2 H V
 
 24
 5 7
 1 3
 4 7
 3 2
 2 8
 1 1
 5 8
 1 2
 4 4
 3 2
 7 8
 1 1
 5 4
 1 2
 4 4
 5 2
 7 8
 1 1
 5 7
 1 2
 4 4
 3 2
 7 9
 1 1
  1 2 H 3 4 H V 5 6 V H 7 8 H 9 10 H V 11 12 V H V 13 14 H 15 16 H V 17 18 V H 19 20 H 21 22 H V 23 24 V H V H
 
 42
 2 3
 3 3
 4 2
 2 5
 4 4
 5 3
 4 4
 5 2
 3 7
 4 7
 3 3
 5 5
 3 3
 2 4
 5 2
 2 5
 4 4
 7 3
 2 3
 3 3
 4 2
 2 5
 4 4
 5 3
 4 4
 5 2
 3 7
 4 7
 3 3
 5 5
 3 3
 2 4
 5 2
 2 5
 4 4
 7 3
 2 6
 4 5
 7 8
 9 4
 3 1
 4 2
 8 4 9 V H 18 14 V H 2 17 V 11 V H 5 15 H 1 H 16 7 12 H V H 10 13 V 6 V 3 H V H 26 22 27 V H 36 32 V H 20 35 V 29 V H 23 33 H 19 H 34 25 30 H V H 28 31 V 24 V 21 H V H V 37 38 V 39 40 V H 41 42 H V H
Ouput

Code: Select all

65
105
221
20
546
1360