码迷,mamicode.com
首页 >  
搜索关键字:const 底层const 顶层const    ( 26295个结果
DSP 中关键字extern,cregister,Near ,Far,restrict,volatile
extern:extern可以置于变量或者函数前,以表示变量或者函数的定义在别的文件中,提示编译器遇到此变量和函数时在其他模块中寻找其定义。另外,extern也可用来进行链接指定。 const: 可以用const定义一些变量或数组,以确保它的值不被改变。 例:int *const p = &x; 定...
分类:其他好文   时间:2014-07-09 20:22:44    阅读次数:221
C++ Primer 学习笔记_85_模板与泛型编程 --模板特化[续]
模板与泛型编程--模板特化[续]三、特化成员而不特化类 除了特化整个模板之外,还能够仅仅特化push和pop成员。我们将特化push成员以复制字符数组,而且特化pop成员以释放该副本使用的内存:templatevoid Queue::push(const char *const &val){ ...
分类:编程语言   时间:2014-07-09 18:14:29    阅读次数:212
hdu1269 Tarjan强连通分量 模板(转)
#include#include#includeusing namespace std;const int maxn=10010;vectorg[maxn];int Bcnt;int Top;int Index;int low[maxn],dfn[maxn];int belong[maxn],sta...
分类:其他好文   时间:2014-07-09 14:01:38    阅读次数:163
账户登录简版
static void Main(string[] args) { const string UN = "admin"; const string PW = "123456"; string usename, password; int i=0; while (i 3) { Console....
分类:其他好文   时间:2014-07-09 13:42:30    阅读次数:172
拓扑排序
之前很傻,,感觉看不到拓扑是啥东西。。脑子太烂了吧。。。今晚上瞄了一眼就懂了。。我就放代码上来就行了。。注释也不打了,,因为太简单了。#include #include using namespace std;#define CC(i) memset(i, 0, sizeof(i))const in...
分类:其他好文   时间:2014-07-09 13:33:27    阅读次数:235
UVA - 225 Golygons
题意:求从原点开始依次走1,2...n步后到回到原点的方案数,其中不能经过障碍,每次必须左右拐 思路:一个比较简单的DFS,结果做了好久#include #include #include #include using namespace std; const int MAXN = 250; const int Add = 100; int n, ans; int G[MAXN][M...
分类:其他好文   时间:2014-07-09 12:23:55    阅读次数:421
uva 12009 - Avaricious Maryanna(暴力)
题目连接:uva 12009 - Avaricious Maryanna 题目大意;给定n,求x,x为n位数,并且x*x的后n位还是x。 解题思路:打个表会发现其实有规律,除了n=1的时候多了0和1,其他都是n-1位的基础上再新增一位数,1位的时候是5,6. #include #include #include using namespace std; const int m...
分类:其他好文   时间:2014-07-09 11:11:09    阅读次数:137
HDU 4849 Wow! Such City!陕西邀请赛C(最短路)
HDU 4849 Wow! Such City! 题目链接 题意:按照题目中的公式构造出临接矩阵后,求出1到2 - n最短路%M的最小值 思路:就根据题目中方法构造矩阵,然后写一个dijkstra,利用d数组取求答案即可 代码: #include #include #include #include using namespace std; const lo...
分类:其他好文   时间:2014-07-09 09:11:12    阅读次数:199
HDU 4856 Tunnels
题意:求经过所有的管道的最短路程,管道内的时间不算 思路:首先BFS处理出管道出口到其他管道入口的距离,然后在队友的指导下明白了状态转移 #include #include #include #include #include using namespace std; const int MAXN = 16; const int INF = 0x3f3f3f3f; struct N...
分类:其他好文   时间:2014-07-09 09:09:21    阅读次数:208
UVA - 434 Matty's Blocks
题意:给你正视和侧视图,求最多多少个,最少多少个 思路:贪心的思想,求最少的时候:因为可以想象着移动,所以我们统计每个视图不同高度的个数,然后计算,至于的话,就是每次拿正视图的高度去匹配侧视求最大 #include #include #include #include using namespace std; const int MAXN = 1000; int k; int vie...
分类:其他好文   时间:2014-07-08 17:30:56    阅读次数:149
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!