码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
IL查看泛型
关于泛型,我们在开发也经常用到,下面一起通过IL来查看一下泛型,代码如下: using System;namespace MyCollection{ public class GenericExample { public static T GetT(T value) { return value;...
分类:其他好文   时间:2014-09-03 11:00:26    阅读次数:281
【BZOJ】1631: [Usaco2007 Feb]Cow Party(dijskstra)
http://www.lydsy.com/JudgeOnline/problem.php?id=1631看到m#include #include #include #include #include #include using namespace std;#define rep(i, n) for...
分类:Web程序   时间:2014-09-03 06:12:46    阅读次数:251
二叉树深度、平衡、相等、求遍历
#include #include #include using namespace std;struct TreeNode { struct TreeNode* left; struct TreeNode* right; char elem; ...
分类:其他好文   时间:2014-09-03 00:08:45    阅读次数:285
1-9,分为3个3位数,比例为1:2:3
C:#includebool check(int a[]);//将九个数放入数组,通过双重循环判断是否有相同的数。 int main(void){ int a[9],i,j,flag=1; int x,y,z; for(i=123;iusing namespace std ;int main ()....
分类:其他好文   时间:2014-09-03 00:06:45    阅读次数:296
uva 1556 - Disk Tree(字典树)
题目连接:uva 1556 - Disk Tree 题目大意:给出N个目录关系,然后按照字典序输出整个文件目录。 解题思路:以每个目录名作为字符建立一个字典树即可,每个节点的关系可以用map优化。 #include #include #include #include #include #include using namespace std; const int ma...
分类:其他好文   时间:2014-09-02 22:54:35    阅读次数:248
bitset使用
17.10使用序列1、2、3、5、8、13、21初始化一个bitset,将这些位置置位。对另一个bitset进行默认初始化,并编写一小段程序将其恰当的位置位。#include#includeusing namespace std;int main(){ bitset bits("1000000...
分类:其他好文   时间:2014-09-02 22:48:15    阅读次数:228
POJ 1734.Sightseeing trip 解题报告
Floyd 最小环模板题code/* floyd最小环,记录路径,时间复杂度O(n^3) 不能处理负环*/#include #include using namespace std;const int INF = 109, maxn = 252645135;int g[INF...
分类:其他好文   时间:2014-09-02 22:43:55    阅读次数:195
多源最短路
Stockbroker Grapevinehttp://poj.org/problem?id=1125模板题 1 #include 2 #include 3 using namespace std; 4 const int inf=0x3f3f3ff; 5 const int M=128; 6 cl...
分类:其他好文   时间:2014-09-02 22:36:05    阅读次数:299
codeforces 430A Points and Segments (easy)(理解能力有待提高……)
题目//终于看懂题目了,,,,//一条线段里面不是每个坐标上都有要染色的点,所以为了满足条件,只能考虑那些给出坐标的点//所以就要排序一下了,不能直接根据坐标0 1 0 1……#include #include #include using namespace std ;struct tt{ ...
分类:其他好文   时间:2014-09-02 22:35:05    阅读次数:257
poj 1721 CARDS (置换群)
//给出置换了s次后的序列,求原序列 # include # include # include using namespace std; int main() { int n,s,t,s1,i,cot; int a[1010],b[1010],c[1010]; while(~scanf("%d%d",&n,&s)) { for(i=1; i<...
分类:其他好文   时间:2014-09-02 21:29:15    阅读次数:381
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!