The closet pair problem

標準的Divide and conquer

有數學式證明只需要檢查該點Y排序好的上下共七點即可

然後restrict的範圍我是用比較直觀的大小

但也有可能可以更好

 

http://nopaste.csie.org/fe27d

文章標籤
全站熱搜
創作者介紹
創作者 robertanders 的頭像
robertanders

Robert Anderson's Blog

robertanders 發表在 痞客邦 留言(0) 人氣(0)