-
好玩的游戏,经典的游戏终于成功了
应用背景你玩儿过扫雷游戏吧?Windows操作系统中带了这个小游戏,那个系统叫什么来着?在游戏中要想过关,就必须要在一个 NxM 的区域上找出所有的地雷。游戏过程中,计算机会在地图上显示一些数字从而帮助你确定哪里有地雷。关键技术Have you ever played the game? Windows operating system with this little game, the system called what? In the game to pass, it is necessary to find out all the mines in a NxM area. In the process of the game, the computer will show some numbers on the map to help you identify where you are.
- 2022-03-26 14:34:01下载
- 积分:1
-
四重奏:一个理论的定理描述的著名四重奏定理";,&……
四方定理描述: 在数论中有一个著名的“四方定理”,它的含义是: 所有自然数至多只要用四个数的平方和就可以表示。 要求: 该题是一个定理,我们不是去证明它,而是要求同学们编程 序来验证该定理的正确性。 输入: 用户从键盘任意输入一个自然数。 输出: 给出满足四方定理中的至多四个自然数。-Quartet theorem Description : Number Theory in a famous "Quartet Theorem," meaning it is : all natural number can use up to four the number of square and can be expressed. Requirements : The title is a theorem, we will prove it, but to require the students programmed to verify the correctness of the theorem. Input : arbitrary user input from the keyboard to a natural number. Output : the Quartet is to meet the theorem up to four natural number.
- 2022-08-12 22:17:17下载
- 积分:1
-
Dijkstar和Floyd算法
程序分别用Dijkstar和Floyd两种算法来计算最短距离,从文件读取点的信息,文件格式为起点,到点,距离。程序含有有时间函数,可以对两种算法进行比较,能够得出比较好的结果。
- 2022-07-22 01:21:18下载
- 积分:1
-
回溯法解N后的C++源码(Visual Stdio2010环境测试通过)
#include #include #include #include using namespace std;class Queen{ friend int nQueen(int);private: bool Place(int k); void Backtrack(int t); void Output(); int n,//皇后个数 *x;//当前解 long sum;//当前已找到的可行性方案数};bool Queen::Place(int k){ for (int j=1;jn) { sum++; Output(); } else { for (int i=1;i
- 2022-02-06 19:11:54下载
- 积分:1
-
贪心算法解决部分背包问题
本程序研究了贪心算法,并把此算法用于部分背包问题上,基于C语言实现,达到最优解。所谓贪心算法是指,在对问题求解时,总是做出在当前看来是最好的选择。也就是说,不从整体最优上加以考虑,所做出的仅是在某种意义上的局部最优解。贪心算法不是对所有问题都能得到整体最优解,但对范围相当广泛的许多问题他能产生整体最优解或者是整体最优解的近似解。部分背包问题: 给定一个最大载重量为M的卡车和N种食品,有食盐,白糖,大米等。已知第 i 种食品的最多拥有Wi 公斤,其商品价值为Vi元/公斤,编程确定一个装货方案,使得装入卡车中的所有物品总价值最大。
- 2022-01-30 12:45:27下载
- 积分:1
-
java统计单词
资源描述
本java程序实现:统计文章中单词出现的次数,并显示出现过的行号。
程序功能实现方式如下:
1.输入一行,对行号计数(也可一次输入全部文本,对行号计数)
2.为一行里的单词建立一个临时的数组,遍历每一个单词:若在单词表中没有,添加进入单词表(word + count +line); 若存在,个数加一(对应word的count++,line加上当前行号)。
3.输出单词表。
属性列名,word:单词;
count:出现次数;
line:出现行数
- 2022-05-10 19:24:32下载
- 积分:1
-
逐次超松弛迭代法(逐次超松弛法,…
逐次超松驰迭代法(Successive Over Relaxation Me thod,简称SOR方法)是高斯―塞德尔方法的一种加速方法,是解大型稀疏矩阵方程组的有效方法之一,它具有计算公式简单,程序设计容易,占用计算机内存较少等优点,但需要较好的加速因子(即最佳松驰因子).下面我们首先说说松驰一词的含意,再利用它来解释雅可比迭代法与高斯―塞德尔迭代法,最后给出逐次超松驰迭代法的推算公式和收敛性条件.-Successive over relaxation iteration method (Successive Over Relaxation Me thod, called SOR method) is the Gauss- Seidel method for an accelerated method is solution of large sparse matrix equations, one effective method, it has a simple formula, programming easy, take up less computer memory, etc., but the need for better acceleration factor (that is, the best relaxation factor). Let us first talk about the meaning of the term relaxation, and then use it to explain the Jacobi s iterative method and the Gauss- Seidel iterative method, and finally gives successive over relaxation iterative method of projection formula and the convergence condition.
- 2022-03-31 14:51:19下载
- 积分:1
-
blowfish 加密算法
blowfish 加密算法 二进制兼容的加密算法,加密匙可到128位-blowfish binary compatible encryption algorithm encryption algorithms, encryption keys can be 128
- 2022-02-10 13:07:59下载
- 积分:1
-
扫描图像处理程序
基于光学三角测量系统,采用双ccd摄像机采集激光光刀在物体表面上的扫描地带,送入程序进行处理,对扫描的图像进行轮廓提取,数据抽稀,数据拼合算法
- 2022-02-21 09:58:55下载
- 积分:1
-
ssa algorithm
这是一个ssa算法的代码。它必须被修改以提高效率,开发一个完整的库可能是一个很好的项目
- 2022-05-05 19:17:21下载
- 积分:1