虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

K-shortest

  • knn算法演示代码

    knn算法演示代码,可自动学习输入点,并形象表现输入点的最近k个邻居。

    标签: knn 算法 代码

    上传时间: 2013-12-16

    上传用户:banyou

  • Problem D:合唱队形 Time Limit:1000MS Memory Limit:65536K Total Submit:1237 Accepted:437 Language

    Problem D:合唱队形 Time Limit:1000MS Memory Limit:65536K Total Submit:1237 Accepted:437 Language: not limited Description N位同学站成一排,音乐老师要请其中的(N-K)位同学出列,使得剩下的K位同学排成合唱队形。 合唱队形是指这样的一种队形:设K位同学从左到右依次编号为1,2…,K,他们的身高分别为T1,T2,…,TK, 则他们的身高满足T1 < T2 < ...< Ti > Ti+1 > … >TK(1<=i<=K)。 你的任务是,已知所有N位同学的身高,计算最少需要几位同学出列,可以使得剩下的同学排成合唱队形。 Input 输入包含若干个测试用例。 对于每个测试用例,输入第一行是一个整数N(2<=N<=100),表示同学的总数。第二行有N个整数,用空格分隔,第i个整数Ti(130<=Ti<=230)是第i位同学的身高(厘米)。当输入同学总数N为0时表示输入结束。 Output 对于每个测试案例,输出包括一行,这一行只包含一个整数,就是最少需要几位同学出列。 Sample Input 8 186 186 150 200 160 130 197 220 3 150 130 140 0 Sample Output 4 1

    标签: Limit Accepted Language Problem

    上传时间: 2014-01-13

    上传用户:aappkkee

  • Problem F:汽车加油 Time Limit:1000MS Memory Limit:65536K Total Submit:1400 Accepted:404 Language

    Problem F:汽车加油 Time Limit:1000MS Memory Limit:65536K Total Submit:1400 Accepted:404 Language: not limited Description 一辆汽车加满油后可行驶n公里。旅途中有若干个加油站。设计一个有效算法,指出应在哪些加油站停靠加油,使沿途加油次数最少。 编程任务: 对于给定的n和k(k <= 10000)个加油站位置,编程计算最少加油次数。 Input 第一行有2 个正整数n和k,表示汽车加满油后可行驶n公里,且旅途中有k个加油站。接下来的1 行中,有k+1 个整数,表示第k个加油站与第 k-1 个加油站之间的距离。第0 个加油站表示出发地,汽车已加满油。第k+1 个加油站表示目的地。 Output 输出最少加油次数。如果无法到达目的地,则输出”No Solution”。 Sample Input 7 7 1 2 3 4 5 1 6 6 Sample Output 4

    标签: Limit Accepted Language Problem

    上传时间: 2016-04-12

    上传用户:youth25

  • Without this, the debugger spontaneously fails! 1 - Install mdk315b 2 - Replace the files: K

    Without this, the debugger spontaneously fails! 1 - Install mdk315b 2 - Replace the files: \Keil\ARM\BIN\ARM.DLL with one from mdk305a\Keil\ARM\BIN\ARM.DLL \Keil\ARM\BIN31\ARM.DLL with one from mdk305a\Keil\ARM\BIN30\ARM.DLL \Keil\UV3\UV3.DLL with one from mdk305a\Keil\UV3\UV3.DLL (*) 3 - Use KeyGen (Ver3p4 works) Select ARM, With computer ID code , External CID code and RealView MDK (or RealView RL) Note: Must replace DLLs before entry of serial (*) - May not be necessary (???)

    标签: spontaneously the debugger Without

    上传时间: 2016-04-13

    上传用户:小宝爱考拉

  • 1) Write a function reverse(A) which takes a matrix A of arbitrary dimensions as input and returns a

    1) Write a function reverse(A) which takes a matrix A of arbitrary dimensions as input and returns a matrix B consisting of the columns of A in reverse order. Thus for example, if A = 1 2 3 then B = 3 2 1 4 5 6 6 5 4 7 8 9 9 8 7 Write a main program to call reverse(A) for the matrix A = magic(5). Print to the screen both A and reverse(A). 2) Write a program which accepts an input k from the keyboard, and which prints out the smallest fibonacci number that is at least as large as k. The program should also print out its position in the fibonacci sequence. Here is a sample of input and output: Enter k>0: 100 144 is the smallest fibonacci number greater than or equal to 100. It is the 12th fibonacci number.

    标签: dimensions arbitrary function reverse

    上传时间: 2016-04-16

    上传用户:waitingfy

  • 数据挖掘算法很多

    数据挖掘算法很多,其中模糊k均值算法是目前使用比较多的分类方法

    标签: 数据挖掘算法

    上传时间: 2014-12-19

    上传用户:xuanchangri

  • rt12864m样例程序

    rt12864m样例程序,管脚号 管脚名称 电平 管脚功能描述 1 VSS 0V 电源地 2 VCC +5V 电源正 3 V0 - 对比度(亮度)调整 4 RS(CS) H/L RS="H",表示DB7--DB0为显示数据 4 RS(CS) H/L RS="L",表示DB7--DB0为显示指令数据 5 R/W(SID) H/L R/W="H",E="H",数据被读到DB7--DB0 5 R/W(SID) H/L R/W="L",E="H→L", DB7--DB0的数据被写到IR或DR 6 E(SCLK) H/L 使能信号 7 DB0 H/L 三态数据线 8 DB1 H/L 三态数据线 9 DB2 H/L 三态数据线 10 DB3 H/L 三态数据线 11 DB4 H/L 三态数据线 12 DB5 H/L 三态数据线 13 DB6 H/L 三态数据线 14 DB7 H/L 三态数据线 15 PSB H/L H:8位或4位并口方式,L:串口方式(见注释1) 16 NC - 空脚 17 /RESET H/L 复位端,低电平有效(见注释2) 18 VOUT - LCD驱动电压输出端 19 A VDD 背光源正端(+5V)(见注释3) 20 K VSS 背光源负端(见注释3)

    标签: 12864m 12864 rt 程序

    上传时间: 2016-04-17

    上传用户:xhz1993

  • 创建长度为n的双向循环链表

    创建长度为n的双向循环链表,值为整数。 查找第k个元素并输出。 删除所有值为m的元素。 逆置链表并输出。

    标签: 长度 循环

    上传时间: 2013-12-21

    上传用户:xiaoyunyun

  • /* * The internal form of a hash table. * * The table is an array indexed by the hash of the k

    /* * The internal form of a hash table. * * The table is an array indexed by the hash of the key collisions * are resolved by hanging a linked list of hash entries off each * element of the array. Although this is a really simple design it * isn t too bad given that pools have a low allocation overhead. */ split from apache for general usage

    标签: table hash The the

    上传时间: 2014-01-07

    上传用户:gtf1207

  • inux 0.11 内核

    inux 0.11 内核,选择它的原因:它是最完善早期发布版本之一,源代码体积小(大小才325 K左右),能正常运行的一个LINUX操作系统的原型

    标签: inux 0.11 内核

    上传时间: 2013-12-09

    上传用户:2467478207