码迷,mamicode.com
首页 >  
搜索关键字:typedef struct    ( 24378个结果
Dijksktra(测试源代码)
1、此程序为c++程序2、以下代码可实现手动输入,即去掉代码中的/*...*/注释符,并同时去掉赋值代码段3、源代码#includeusing namespace std;#define MaxInt 32767#define MVNum 100typedef struct{ char vexs[M...
分类:其他好文   时间:2014-06-26 16:29:13    阅读次数:234
自己第一个控制台的游戏——贪吃蛇
一直想自己写个游戏玩玩,好像很厉害的样子,终于今天下定决心写了个最经典的休闲的小游戏——贪吃蛇,当然也有借鉴别人的程序,但是整个代码都是和别人不一样的,直接上代码吧: #include #include #include #include using namespace std; #define ROW 22 #define COL 22 struct Point { char ch...
分类:其他好文   时间:2014-06-26 13:24:30    阅读次数:196
POJ 1041 John's trip Euler欧拉回路判定和求回路
就是欧拉判定,判定之后就可以使用DFS求欧拉回路了。图论内容。 这里使用邻接矩阵会快很多速度。 这类题目都是十分困难的,光是定义的记录的数组变量就会是一大堆。 #include #include #include #include using namespace std; struct Edge { int ed, des; Edge(int e = 0, int d ...
分类:其他好文   时间:2014-06-26 13:16:05    阅读次数:250
克鲁斯卡尔(模板题)
http://acm.hdu.edu.cn/showproblem.php?pid=1372以前真二,模板题OJ真奇怪,有时能A有时W,#include #include #include #include using namespace std;struct node{ int x,y,z;...
分类:其他好文   时间:2014-06-26 12:17:50    阅读次数:161
hdu 1429 状压bfs
#include #include #include #include #include #include #include #include #include #define inf 0x3f3f3f3f #define ll __int64 #define mod 1000000007 using namespace std; struct node { int x...
分类:其他好文   时间:2014-06-26 11:39:45    阅读次数:206
操作系统——linux文件系统初实现
简述:0、ext2格式。1、包括权限管理,精确到角色。2、数据块采用连续分配(离散分配大家来弄吧)。3、为实现间接索引,相信实现了目录,简介索引也不是问题吧。。4、删除目录不支持递归删除。自己写去吧。5、整体结构:6、主要数据结构://超级块struct SuperBlock{ int s_b...
分类:系统相关   时间:2014-06-26 11:18:45    阅读次数:301
解决QT:forward declaration of 'struct Ui::xxx';invalid use of incomplete struct "Ui::Widget" 等莫名奇妙错误
解决QT:forward declaration of 'struct Ui::xxx';invalid use of incomplete struct "Ui::Widget" 等莫名奇妙错误...
分类:其他好文   时间:2014-06-26 08:14:03    阅读次数:260
hdu 4828 Grids(拓展欧几里得+卡特兰数)
题目链接:hdu 4828 Grids 题目大意:略。 解题思路:将上一行看成是入栈,下一行看成是出栈,那么执着的方案就是卡特兰数,用递推的方式求解。 #include #include typedef long long ll; const int N = 1000005; const ll MOD = 1e9+7; ll dp[N]; ll extendGcd(ll a...
分类:其他好文   时间:2014-06-26 06:58:03    阅读次数:197
bnu 34895 Elegant String(矩阵快速幂)
题目链接:bnu 34895 Elegant String 题目大意:给定n和k,表示有一个长度为n的序列,序列中的元素由0~k组成,问说有多少个串满足不包含0~k的全排列。 解题思路:矩阵快速幂,根据dp[i][j]表示说第i为有j个相同,写出递推式,根据递推式求出矩阵。 #include #include typedef long long ll; const ll MOD...
分类:其他好文   时间:2014-06-26 06:54:09    阅读次数:205
自学ios:second day Objective-C
oc是c的超集,从c扩展而来,具备面向对象的特性,比如类,消息,单继承。c的部分:数据类型:short,int,long,float,double,char,pointer,struct常用方法:readline()atoi()sizeof()malloc()oc的部分:receiver:classNameOrObjectselector:method消息的传递通过[recei..
分类:移动开发   时间:2014-06-26 06:39:56    阅读次数:305
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!