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

2<b>2</b>1

  • void Knight(int i , int j) { // printf("%d %dn",i,j) if (board[i][j] != 0 || i < 0 || i >=

    void Knight(int i , int j) { // printf("%d %dn",i,j) if (board[i][j] != 0 || i < 0 || i >= Size || j < 0 || j >= Size ) { return } step++ board[i][j]=step if (step == Size*Size) { showboard() system("PAUSE") return } //DFS Knight(i-2,j-1) //left Knight(i-2,j+1) Knight(i+2,j-1) //right Knight(i+2,j+1) Knight(i-1,j-2) //up Knight(i+1,j-2) Knight(i+1,j+2) //down Knight(i-1,j+2) // board[i][j]=0 step-- }

    标签: int Knight printf board

    上传时间: 2014-01-17

    上传用户:cxl274287265

  • matlab最短路的贪心算法

    matlab最短路的贪心算法,用VC++实现,把ShortEst.dll复制到matlab工作文件夹运行(先要运行mex-setup,关联VC与MATLAB)调用方法如 a = [-1,2,3 2,-1,4 3,4,-1] ShorstEst(a) 即可

    标签: matlab 短路 算法

    上传时间: 2013-12-10

    上传用户:cxl274287265

  • The AT24C512 provides 524,288 bits of serial electrically erasable and programmable read only memor

    The AT24C512 provides 524,288 bits of serial electrically erasable and programmable read only memory (EEPROM) organized as 65,536 words of 8 bits each. The device鈥檚 cascadable feature allows up to four devices to share a common two-wire bus. The device is optimized for use in many industrial and commercial applications where lowpower and low-voltage operation are essential. The devices are available in spacesaving 8-pin PDIP, 8-lead EIAJ SOIC, 8-lead JEDEC SOIC, 8-lead TSSOP, 8-lead Leadless Array (LAP), and 8-lead SAP packages. In addition, the entire family is available in 2.7V (2.7V to 5.5V) and 1.8V (1.8V to 3.6V) versions.

    标签: electrically programmable provides erasable

    上传时间: 2017-04-09

    上传用户:cc1015285075

  • vb2005编写的计算器。 直接输入字符串

    vb2005编写的计算器。 直接输入字符串,如: 4+pi^2+sin(3*cos(2)*e^2)+2.3E13 常数:pi,e 科学计数表示:1E4(1*10^4) 函数支持常用函数:sin,cos,tan,atan,asin...

    标签: 2005 vb 编写 字符串

    上传时间: 2017-04-20

    上传用户:weixiao99

  • 一篇空时码的综述文章

    一篇空时码的综述文章,以及给出了1*1,1*2,2*1,2*2接收发机天线结构的matlab仿真程序。

    标签: 空时码

    上传时间: 2017-04-22

    上传用户:cc1

  • OTSU Gray-level image segmentation using Otsu s method. Iseg = OTSU(I,n) computes a segmented i

    OTSU Gray-level image segmentation using Otsu s method. Iseg = OTSU(I,n) computes a segmented image (Iseg) containing n classes by means of Otsu s n-thresholding method (Otsu N, A Threshold Selection Method from Gray-Level Histograms, IEEE Trans. Syst. Man Cybern. 9:62-66 1979). Thresholds are computed to maximize a separability criterion of the resultant classes in gray levels. OTSU(I) is equivalent to OTSU(I,2). By default, n=2 and the corresponding Iseg is therefore a binary image. The pixel values for Iseg are [0 1] if n=2, [0 0.5 1] if n=3, [0 0.333 0.666 1] if n=4, ... [Iseg,sep] = OTSU(I,n) returns the value (sep) of the separability criterion within the range [0 1]. Zero is obtained only with images having less than n gray level, whereas one (optimal value) is obtained only with n-valued images.

    标签: OTSU segmentation Gray-level segmented

    上传时间: 2017-04-24

    上传用户:yuzsu

  • 薛超英数据结构实习一答案 设有n个人站成一圈

    薛超英数据结构实习一答案 设有n个人站成一圈,每个人持有一个密码(正整数)。现从第t个人开始,按顺时针方向“1,2,3,4,…”循环报数,数到m1(第t个人所持密码)的人出列,然后从出列者的下一个人重新开始报数,数到m2(刚出列者所持密码)的人又出列,如此重复进行,直到n个人都出列为止。 问题是:对于任意给定的n个人的原始排列顺序,求出n个人的出列顺序。 输入数据从文本文件“实习1数据.txt”中读取。该文件有两行:第1行只有一个整数,表示报数的起始位置;第2行是n个所持密码。 输出结果显示在屏幕上。 例如,从文本文件读取数据 2 5 6 3 2 2 4 屏幕显示 1 6 5 3 4 2

    标签: 数据结构 实习

    上传时间: 2014-01-05

    上传用户:thuyenvinh

  • 一、前言 24点游戏是一个常见游戏

    一、前言 24点游戏是一个常见游戏,出题者给出4个整数,要求答题者在指定时间内给出一个四则运算的表达式,恰好用上这这个整数各一次,计算结果为24,超出时间为输。 二、分析 用计算机来算这个题,搜索速度当然有很大优势,我编程喜欢考虑通用一点,不限制输入数量和结果数,甚至不限制运算符数量。这样组合数就很大,如果输入数比较多,则搜索时间会非常长。 我用两个方法来提高搜索速度:一、是大家都能考虑到的重复搜索问题,比如1,2,3和2,3,1所有的组合情况是相同的,我只搜索使用递增序的数组,则可以降低一个组合数的数量级别;二、使用动态规划中的备忘录方法,比如你计算出2和3所有可能的计算结果,则他们与4结合的时候,要用到,与1结合的时候,也要用到,使用备忘录,可以只计算一次,大大降低运算复杂度。 三、设计 整体设计:分别设计4个类:游戏、表达式、运算、分数,各司其责,结构清晰,易于扩展。

    标签:

    上传时间: 2014-01-13

    上传用户:zhangyigenius

  • //初始化 if(initscr() == NULL) { perror("initcurs") exit(EXIT_FAILURE) } cbreak()

    //初始化 if(initscr() == NULL) { perror("initcurs") exit(EXIT_FAILURE) } cbreak() noecho() keypad(stdscr, TRUE) //建立菜单项 for(i=0 i<N_ITEMS i++){ items[i] = new_item(months[i], "") } //建立菜单 mymenu = new_menu(items) //设置为5行单列的菜单 set_menu_format(mymenu, 5, 1) set_menu_mark(mymenu, "*") //获得菜单的行数很列数 scale_menu(mymenu, &mrows, &mcols) //建立窗口和子窗口 win = newwin(mrows + 2, mcols + 2, 3, 30) keypad(win, TRUE) box(win, 0, 0) subwin = derwin(win, 0, 0, 1, 1) //设置菜单的窗口 set_menu_sub(mymenu, subwin) //在子窗口上放置菜单 post_menu(mymenu) refresh() wrefresh(win)

    标签: EXIT_FAILURE initcurs initscr cbreak

    上传时间: 2013-11-29

    上传用户:小眼睛LSL

  • 這是個prolog程式

    這是個prolog程式,能解決4x4的數獨問題 例: ?- sudoku ([4,2,0,0]/[0,1,0,2]/[0,0,1,0]/[1,0,0,4], Solution). Solution = [[4,2,3,1]/[3,1,4,2]/[2,4,1,3]/[1,3,2,4]]

    标签: prolog 程式

    上传时间: 2017-07-21

    上传用户:rocwangdp