Input : A set S of planar points Output : A convex hull for S Step 1: If S contains no more than five points, use exhaustive searching to find the convex hull and return. Step 2: Find a median line perpendicular to the X-axis which divides S into SL and SR SL lies to the left of SR . Step 3: Recursively construct convex hulls for SL and SR. Denote these convex hulls by Hull(SL) and Hull(SR) respectively. Step 4: Apply the merging procedure to merge Hull(SL) and Hull(SR) together to form a convex hull. Time complexity: T(n) = 2T(n/2) + O(n) = O(n log n)
标签: contains Output convex planar
上传时间: 2017-02-19
上传用户:wyc199288
一台精密仪器的工作时间为n 个时间单位。与仪器工作时间同步进行若干仪器维修程序。一旦启动维修程序,仪器必须进入维修程序。如果只有一个维修程序启动,则必须进入该维修程序。如果在同一时刻有多个维修程序,可任选进入其中的一个维修程序。维修程序必须从头开始,不能从中间插入。一个维修程序从第s个时间单位开始,持续t个时间单位,则该维修程序在第s+t-1 个时间单位结束。为了提高仪器使用率,希望安排尽可能少的维修时间。对于给定的维修程序时间表,该算法计算最优时间表。
上传时间: 2017-03-13
上传用户:chongcongying
s document describe davicom ic dm9000 DM9000_h.h . this ic can be used in the embedded systems and network lan cards. its is 10/100Mpbs ic.
标签: 9000 document describe embedded
上传时间: 2013-12-10
上传用户:xyipie
将魔王的语言抽象为人类的语言:魔王语言由以下两种规则由人的语言逐步抽象上去的:α-〉β1β2β3…βm ;θδ1δ2…-〉θδnθδn-1…θδ1 设大写字母表示魔王的语言,小写字母表示人的语言B-〉tAdA,A-〉sae,eg:B(ehnxgz)B解释为tsaedsaeezegexenehetsaedsae对应的话是:“天上一只鹅地上一只鹅鹅追鹅赶鹅下鹅蛋鹅恨鹅天上一只鹅地上一只鹅”。(t-天d-地s-上a-一只e-鹅z-追g-赶x-下n-蛋h-恨)
上传时间: 2013-12-19
上传用户:aix008
int show_char(int n, const char *name, chtype code) { const int height = 16 int row = 4 + (n height) int col = (n / height) * COLS / 2 mvprintw(row, col, " *s : ", COLS/4, name) addch(code) return n + 1 }
标签: int const show_char chtype
上传时间: 2017-06-12
上传用户:3到15
The code performs a number (ITERS) of iterations of the Bailey s 6-step FFT algorithm (following the ideas in the CMU Task parallel suite). 1.- Generates an input signal vector (dgen) with size n=n1xn2 stored in row major order In this code the size of the input signal is NN=NxN (n=NN, n1=n2=N) 2.- Transpose (tpose) A to have it stored in column major order 3.- Perform independent FFTs on the rows (cffts) 4.- Scale each element of the resulting array by a factor of w[n]**(p*q) 5.- Transpose (tpose) to prepair it for the next step 6.- Perform independent FFTs on the rows (cffts) 7.- Transpose the resulting matrix The code requires nested Parallelism.
标签: iterations performs Bailey number
上传时间: 2014-01-05
上传用户:libenshu01
M i c r o s o f t公司编译了一个所有可能的错误代码的列表,并且为每个错误代码分配了一个3 2 位的号码。Wi n E r r o r. h 头文件包含了M i c r o s o f t 公司定义的错误代码的列 表。
上传时间: 2013-12-08
上传用户:凌云御清风
n个猴子围坐一圈并按照顺时针方向从1到n编号,从第s个猴子开始进行1到m的报数,报数到第m的猴子退出报数,从紧挨它的下一个猴子重新开始1到m的报数,如此进行下去知道所有的猴子都退出为止。求给出这n个猴子的退出的顺序表。
标签: 方向
上传时间: 2017-07-17
上传用户:luopoguixiong
由文件input.txt提供输入数据。输入文件第1 行有2个正整数n和m(1<=n,m<=100), 表示仓库是n×m个格子的矩形阵列。接下来有n行,每行有m个字符,表示格子的状态。 S 表示格子上放了不可移动的沉重货物; w 表示格子空闲; M 表示仓库管理员的初始位置; P 表示箱子的初始位置; K 表示箱子的目标位置。
上传时间: 2017-08-05
上传用户:cainaifa
给定两个串S和T,长分别m和n,算法给出了一个找出二串间最大匹配的算法。该算法可用于比较两个串S和T的相似程度。
标签:
上传时间: 2014-01-27
上传用户:sunjet