![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
牟林伟
我们都要好好的!
展开
-
简单算法--递归
李白打酒 话说大诗人李白,一生好饮。幸好他从不开车。 一天,他提着酒壶,从家里出来,酒壶中有酒2斗。他边走边唱: 无事街上走,提壶去打酒。 逢店加一倍,遇花喝一斗。 这一路上,他一共遇到店5次,遇到花10次,已知最后一次遇到的是花,他正好把酒喝光了。 请你计算李白遇到店和花的次序,可以把遇店记为a,遇花记为b。则:babaabbabbabbbb 就...原创 2018-11-06 21:07:54 · 111 阅读 · 0 评论 -
A*寻路C++ 代码
#include "AStar.h" //准备一张 开标 和 闭表 std::vector<CAStar::_NODE>CAStar::open; std::vector<CAStar::_NODE>CAStar::close; #define _ABS(v) ((v) < 0 ? -(v):(v)) #define _H_V(c, e) (_ABS...原创 2018-12-19 18:14:15 · 447 阅读 · 0 评论 -
A*寻路
#include <algorithm> #include <iostream> #include <vector> #include <math.h> int W; int H; int S; struct Position { Position(int _x = 0,int _y = 0) { x = _x; y = _y; ...原创 2018-12-19 18:32:07 · 170 阅读 · 1 评论 -
一些小方法诸如:交换值,排序,查找等等
#include<iostream> #include<windows.h> //#include"c:\Users\Administrator\Desktop\dd\aaa.h" //------strlen 没有结束符,sizeof 有结束符 int a = 1; int b = 2; int arr[] ={1,2,6,4,8,9,11,55,23}; int mu...原创 2018-12-19 19:00:10 · 179 阅读 · 0 评论