
算法
ASTRONY_
0
展开
-
希尔排序--自上而下的归并--自底而上的并归--快速排序--三向切分
代码有部分可能有重复定义,去除/**///头文件01.h#pragma once#ifndef H01#define H01#include<iostream>using std::cout;using std::cin;const int M=10;template <class T>bool less(T *p, int a, int b){...原创 2018-11-23 11:04:38 · 204 阅读 · 0 评论 -
递归调用 汉诺塔问题 八皇后问题 c++
// 实验00.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include<iostream>using namespace std;int i = 0;void move01(char x, char y, char z, int n){ if (n == 1){ cout << x << "-&g...原创 2018-12-30 20:13:55 · 354 阅读 · 0 评论 -
马踏棋盘 (骑士周游)问题
// 代码// 马踏棋盘.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。//#include "pch.h"#include"stdio.h"#include"time.h"#define X 6 //棋盘>=6且为偶数#define Y 6int CHESS[X][Y];int next(int *x, int *...原创 2019-01-21 14:33:14 · 263 阅读 · 0 评论 -
dfs 迷宫图
//find.cpp#include "pch.h"#include<STDIO.H>int kk = 13; //假设的最大步数int KK[12] = { 0 }; //记录短路程轨迹int SUM = 0; //每种算法步数int hh[26] = { 0 }; ...原创 2019-01-21 20:28:02 · 355 阅读 · 0 评论