搜索资源列表
tony
- 河內塔問題 #include<stdio.h> #include<stdlib.h> int fun_a(int) void fun_b(int,int,int,int) int main(void) { int n int option printf("題目二:河內塔問題\n") printf("請輸入要搬移的圓盤數目\n") scanf("%d",&n) printf("最少搬移的次數為%d
Dijkstra
- 用Dijkstra法求最短路径,有向图与无向图均可-void ShortestPath_DIJ( Node a ,Status i ,Status v0 ,Status*D ,Status*pre ) { int v,w,j,l=1 Status*final Status min final=(Status*)malloc( sizeof(Status)*i ) for(v=0 v<i v++) { final[v]=FA
upload4
- 使用模拟退火算法解决旅行商问题 程序框架中的Annealing.java文件,Annealing.java实现了Inter.java接口中的函数。接口函数getStrategy是一个返回类型为void的函数,函数的输入参数是一个字符串,代表输入文件的文件名-The use of simulated annealing algorithm to solve the TSP program in the framework of Annealing.java files, Annealing.j
bashuma-
- 人工智能八数码问题实现八数码问题:在3×3的方格棋盘上,摆放着1到8这八个数码,有1个方格是 空的,其初始状态如图1所示,要求对空格执行空格左移、空格右移、空格上移 和空格下移这四个操作使得棋盘从初始状态到目标状态。 -#include <stdio.h>//定义变量 #include <stdlib.h>//定义变量 typedef struct s_node//定义创建节点 { struct s_node*father /