Home » questions » its a question frm google code jam .plz sb help me to solve it..?
its a question frm google code jam .plz sb help me to solve it..?
Some students are sitting in a straight line giving an examination...The Students positon are given in an array.And the distance up to which a student can talk is also given.We have to find the minimum number of sets of questions required so that nobdy could cheat....
For eg . if a={ 1,2,3,4,5} and distance=1(each student can approach one bench ahead and one bench behind)
then minimum of 2 sets are required..(give questions alternately)
if a={0,4,5,6,7,12,13,14,16,17} and distance =5
Then minimum of 5 sets are required ...
What would be the algorithm ??Can any body suggest sth here..

Answers
Neil
On 2006-07-30 23:52:26