美国人的农忙: 剪草坪 (转载)# Joke - 肚皮舞运动
o*i
1 楼
A machine known as, equivalence tester, can determine whether two bank cards
correspond to the same
account by taking two cards at a time as input and outputting whether they
are equivalent. Give an
algorithm which invokes equivalence tester at most O(n lg n) to determine
whether there is a set of
more than n/2 equivalent cards in the given n bank cards.
correspond to the same
account by taking two cards at a time as input and outputting whether they
are equivalent. Give an
algorithm which invokes equivalence tester at most O(n lg n) to determine
whether there is a set of
more than n/2 equivalent cards in the given n bank cards.