## 808 - Bee Breeding

Moderator: Board moderators

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Contact:
All the cases given are correct. You can try the following I/O set...

Input:

Code: Select all

``````16 9999
65 212
213 233
211 2323
1223 2
323 90
6562 656
762 212
92 97
100 1000
2938 9
2 9
2 901
3 8
6 85
7 548
7 90
7 128
0 0``````
Output:

Code: Select all

``````The distance between cells 16 and 9999 is 60.
The distance between cells 65 and 212 is 9.
The distance between cells 213 and 233 is 15.
The distance between cells 211 and 2323 is 34.
The distance between cells 1223 and 2 is 21.
The distance between cells 323 and 90 is 7.
The distance between cells 6562 and 656 is 32.
The distance between cells 762 and 212 is 24.
The distance between cells 92 and 97 is 5.
The distance between cells 100 and 1000 is 24.
The distance between cells 2938 and 9 is 33.
The distance between cells 2 and 9 is 1.
The distance between cells 2 and 901 is 18.
The distance between cells 3 and 8 is 2.
The distance between cells 6 and 85 is 4.
The distance between cells 7 and 548 is 13.
The distance between cells 7 and 90 is 4.
The distance between cells 7 and 128 is 6.``````
Hope it works.
Ami ekhono shopno dekhi...
HomePage

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Contact:
I m telling you my method...

First locate the positions as described in the problem 10182-Bee Maja. Then you can easily find the minimum distance.

Hope it helps.
Ami ekhono shopno dekhi...
HomePage

pooya
New poster
Posts: 5
Joined: Sat Jun 16, 2007 1:18 am
arc16 wrote:i guess no cell number > 10000, although 10000 will occur.
maybe you can try this:

Code: Select all

``````1 10000
10000 5
9999 10000
10000 10000
``````

Code: Select all

``````58
58
1
0
``````
good luck
Hi
your test case helped me & I get AC but my program answer to
10000 5
is
59

Fransisfl
New poster
Posts: 1
Joined: Mon Sep 05, 2011 2:30 pm
Contact:

### Re: 808 - Bee Breeding

Thanxs for the informative post) highly appreciate the methods track a cell phone represented on the forum)) hope to find useful information in the future, too

Zeittriven
New poster
Posts: 1
Joined: Mon Oct 17, 2011 6:19 pm

### Re: 808 - Bee Breeding

your test case helped me & I get AC but my program answer to
10000 5
is
59
Don't know why you've got ths result. I have 58 as well as others.