ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1117. Hierarchy

Hint ++ with tests!
Posted by Tolstobrov_Anatoliy[Ivanovo SPU] 6 Aug 2005 17:15

Use this and you got AC!
  Answer(n,m)=abs( Answer(1,n)-Answer(1,m) )

check this(130 tests) and YOU got AC (I think)
(N M Answer)
1 1 0
1 2 0
1 3 0
1 4 1
1 5 2
1 6 2
1 7 2
1 8 4
1 9 6
1 10 6
1 11 6
1 12 7
1 13 8
1 14 8
1 15 8
1 16 11
1 17 14
1 18 14
1 19 14
1 20 15
1 21 16
1 22 16
1 23 16
1 24 18
1 25 20
1 26 20
1 27 20
1 28 21
1 29 22
1 30 22
1 31 22
1 32 26
1 33 30
1 34 30
1 35 30
1 36 31
1 37 32
1 38 32
1 39 32
1 40 34
1 41 36
1 42 36
1 43 36
1 44 37
1 45 38
1 46 38
1 47 38
1 48 41
1 49 44
1 50 44
1 51 44
1 52 45
1 53 46
1 54 46
1 55 46
1 56 48
1 57 50
1 58 50
1 59 50
1 60 51
1 61 52
1 62 52
1 63 52
1 64 57
1 65 62
1 66 62
1 67 62
1 68 63
1 69 64
1 70 64
1 71 64
1 72 66
1 73 68
1 74 68
1 75 68
1 76 69
1 77 70
1 78 70
1 79 70
1 80 73
1 81 76
1 82 76
1 83 76
1 84 77
1 85 78
1 86 78
1 87 78
1 88 80
1 89 82
1 90 82
1 91 82
1 92 83
1 93 84
1 94 84
1 95 84
1 96 88
1 97 92
1 98 92
1 99 92
1 100 93
1 101 94
1 102 94
1 103 94
1 104 96
1 105 98
1 106 98
1 107 98
1 108 99
1 109 100
1 110 100
1 111 100
1 112 103
1 113 106
1 114 106
1 115 106
1 116 107
1 117 108
1 118 108
1 119 108
1 120 110
1 121 112
1 122 112
1 123 112
1 124 113
1 125 114
1 126 114
1 127 114
1 128 120
1 129 126
1 130 126
Re: Hint ++ with tests!
Posted by Fyodor Menshikov 22 Feb 2007 19:02
Tolstobrov_Anatoliy[Ivanovo SPU] wrote 6 August 2005 17:15
Use this and you got AC!

I think big test is also useful:
1 2147483647 2147483586
Re: Hint ++ with tests!
Posted by elmariachi1414 (TNU) 9 Jan 2008 19:03
Also usefull tests:
WA 8:
4 12 (answer = 6)
WA 18:
7 9 (answer = 4)