联合开发网   搜索   要求与建议
                登陆    注册
排序按匹配   按投票   按下载次数   按上传日期
按分类查找All 数值算法/人工智能(63) 
按平台查找All Visual C++(63) 

[数值算法/人工智能] 8数码

需要说明的是:本文示例图中的目标状态在计算上是最快捷的,首先取数很方便,一般地查看目标在第i个位置上的值,则需要访问数组goal[i],而这里goal[i]==i,故而无需访问数组;第二,要想知道数码n的目标位置,则需要找到goal[i]==n,然后row=i/3,col=i%3. 但是这里的话,row=n/3,col=n%3. 当我们用8位无符号整型来表示各个数码值(0~8)时,n/3和n%3操作是非常快的,比访问数组还快。 程序还提供一种玩游戏模式,即用户自己通过W,S,A,D四个键分别控制空格往上、下、左、右四个方向移动一步,功能很简单,界面部分是用OpenCV做的。界面部分和搜索部分是完全分离的,demo文件中main函数部分显示了如何将它们组合使用。
Need explanation is: This paper sample figure in the target state is the most efficient in calculation, the first number is very convenient, generally view the targets in the I position on the value, requires access to an array of goal[i], where goal[i]==i, therefore no need to access the array; second, to know the digital n the position of the target, you need to find goal[i]==n, row=i/3 and col=i%3., but here, row=n/3, col=n%3. when we use 8 bit unsigned integer to the digital value (0~8), n/3 and n%3 operations are very fast, faster than accessing array. Program also provides a play game mode, that is, users themselves through W, S, A, D, four keys, respectively, control space, up, down, left, right four directions move a step, the function is very simple, the interface part is done with OpenCV. The interface section is completely separate from the search section, and the main function section in the demo file shows how to combine them. (2017-07-06, Visual C++, 456KB, 下载1次)

http://www.pudn.com/Download/item/id/1499310731682666.html

[数值算法/人工智能] hebing

石子合并问题 问题描述: 在一个圆形操场的四周摆放着n 堆石子。现要将石子有次序地合并成一堆。规定每次只能选相邻的2 堆石子合并成新的一堆,并将新的一堆石子数记为该次合并的得分。试设计一个算法,计算出将n堆石子合并成一堆的最小得分和最大得分。 编程任务: 对于给定n堆石子,编程计算合并成一堆的最小得分和最大得分。 数据输入: 第1 行是正整数n,1<=n<=100,表示有n堆石子。 第二行有n个数,分别表示每堆石子的个数。 结果输出: 第1 行中的数是最小得分;第2 行中的数是最大得分。 输入 6 3 4 5 6 7 8 9 输出 84 125
Stones merger Problem description: Around in a circular playground placed n heap stones. Stones are to be combined into a pile orderly. Can only be selected for each and every adjacent two reactor combined into a new pile of stones, and the new pile of stones and recorded the score for the merger. Try to design an algorithm to calculate the n combined into a pile of gravel heap minimum score and maximum score. Programming tasks: Heap for a given n stones, programming combined into a pile of calculating the minimum score and maximum score. Data entry: Line 1 is a positive integer n, 1 <= n <= 100, that there n stone heap. There are n number of second line, respectively the number of stones per heap. The resulting output: Line 1 is the minimum score in a few No. 2 line number is the maximum score. Enter 6 3456789 Export 84 125 (2010-05-16, Visual C++, 1KB, 下载9次)

http://www.pudn.com/Download/item/id/1174488.html

[数值算法/人工智能] FLOYD_Renting_Boats

acm算法设计:【FLOYD算法】Renting Boats 描述: 长江游艇俱乐部在长江上设置了n 个游艇出租站1,2,…,n。游客可在这些游艇出租站租用游艇,并在下游的任何一个游艇出租站归还游艇。游艇出租站i 到游艇出租站j 之间的租金为r(i,j),1< =i< j < =n。试设计一个算法,计算出从游艇出租站1 到游艇出租站n 所需的最少租金。 输入: 第1 行中有1 个正整数n(n<=200),表示有n个游艇出租站。接下来的n-1 行是r(i,j),1< =i< j < =n。 输出: 从游艇出租站1 到游艇出租站n所需的最少租金 例输入: 3 5 15 7 例输出: 12
acm algorithm design:【FLOYD algorithm】Renting Boats Description: Yangtze River Yacht Club has set up in the Yangtze River on a yacht rental n points 1,2, ..., n. Visitors can stand in these yacht rental yacht rental, and any one of the lower reaches of the return of yacht rental yacht station. Yacht rental yacht rental station i to station j rent between r (i, j), 1 < = i < j < = n. Try to design an algorithm to calculate from the yacht rental yacht rental station 1 to station n at least required to rent. Input: line 1 have a positive integer n (n < = 200), said there are n-yacht rental station. The next n-1 line is r (i, j), 1 < = i < j < = n. Output: from the yacht rental yacht rental station 1 to station n at least required for the importation of rent cases: 3 5,15 7 cases output: 12 (2009-06-12, Visual C++, 338KB, 下载19次)

http://www.pudn.com/Download/item/id/804376.html
1234
总计:63