码迷,mamicode.com
首页 >  
搜索关键字:step    ( 4105个结果
poj 2243 bfs 利用 结构体中的step成员保存步数 ,STL的队列
//BFS#include #include using namespace std;bool used[8][8];int move[8][2]={1,2, -1,2, -2,1, -2,-1, -1,-2, 1,-2, 2,-1, 2,1};struct position{ int i,j...
分类:其他好文   时间:2014-08-09 11:21:17    阅读次数:245
hdu 1242
#include#include#include#includeusing namespace std;struct point{ int x,y,step;}p;string map[211];int used[211][211];int f[4][2] = {{1,0},{0,1}...
分类:其他好文   时间:2014-08-08 20:49:36    阅读次数:228
poj3026Borg Maze(bfs预处理+最小生成树)
题目链接: 啊哈哈,点我点我 思路: 首先把图中的A S预处理出来,然后对这些点逐一做bfs找到这些点到其它点的最短路径,然后建图完毕也用最小生成树的prim算法或者kruscal算法求出连接所有点的最短距离。。不知道为嘛用dis数组去维护为什么会超时,而在结构体里面用step数组却可以过,我也不知道为什么,纠结了很多天。。我把错误的代码贴出来,希望各位帮我找出原因,不胜感激。。。 ...
分类:其他好文   时间:2014-08-07 09:48:49    阅读次数:242
Edit Distance leetcode java
题目:Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You ha....
分类:编程语言   时间:2014-08-07 05:11:48    阅读次数:258
Permutations
问题:全排列class Solution {public: void dfs(vector &num,vector &vec2,vector >&vec1,int step,int vis[]) { if(step==num.size()) { ...
分类:其他好文   时间:2014-08-06 22:25:02    阅读次数:193
使用MongoVUE对MongoDB 进行MapReduce操作步骤
Step 1 Open MongoVUE and connect to the server that contains the collection “cities”   Step 2 Right-click on “cities” collection under “Database Explorer”, and select “MapReduce”. This will laun...
分类:数据库   时间:2014-08-06 19:07:42    阅读次数:352
cocos2dx环境配置和打包
安装软件准备: vs2012 cocos2d-x-2.2.1 adt-bundle-windows-x86_64-20121030 android-ndk-r9c-windows-x86_64 jdk-7u21-windows-x64 python-2.7.6.amd64 cygwin64 setup-x86_64 Step 1:安装visual studio 20...
分类:其他好文   时间:2014-08-05 15:50:19    阅读次数:429
HDU 2815 Mod Tree 离散对数 扩展Baby Step Giant Step算法
链接:http://acm.hdu.edu.cn/showproblem.php?pid=2815 题意: 思路:与上题不同,这道题不要求m是素数,是利用扩展Baby Step Giant Step算法求离散对数。 以下转载自:AekdyCoin 【扩展Baby Step Giant Step】 【问题模型】 求解 A^x = B (mod C) 中 0 【写在前面】...
分类:其他好文   时间:2014-08-05 00:45:48    阅读次数:306
Step 2---有关Github的几个问题
1.取得项目的Git仓库的方式第一种是在现存的目录下,通过导入所有文件来创建新的 Git 仓库。要对现有的某个项目开始用 Git 管理,只需到此项目所在的目录,执行:$ git init初始化后,在当前目录下会出现一个名为 .git 的目录,所有 Git 需要的数据和资源都存放在这个目录中。第二种是...
分类:其他好文   时间:2014-08-04 21:02:17    阅读次数:223
POJ 2417 Discrete Logging 离散对数
链接:http://poj.org/problem?id=2417 题意: 思路:求离散对数,Baby Step Giant Step算法基本应用。 以下转载自:AekdyCoin 【普通Baby Step Giant Step】 【问题模型】 求解 A^x = B (mod C) 中 0 【思路】 我们可以做一个等价 x = i * m + j  ( 0 而...
分类:其他好文   时间:2014-08-04 17:40:27    阅读次数:242
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!