码迷,mamicode.com
首页 >  
搜索关键字:struct stat    ( 35365个结果)
HDU4462稻草人
l问题描述:有一块N*N的玉米田(N 2 #include 3 #include 4 5 using namespace std; 6 7 int field[52][52]; 8 int N,K; 9 10 struct Node{11 int x,y,r;12 }node[11];1...
分类:其他好文   时间:2014-07-22 22:46:15    阅读次数:216
使用结构struct作为Dictionary<TKey,TValue>的键
我们经常用简单数据类型,比如int作为泛型Dictionary的key,但有时候我们希望自定义数据类型作为Dictionary的key,如何做到? 如果我们想自定义一个struct类型作为key,就必须针对该struct定义一个实现IEqualityComparer接口的比较类,实现该接口的2个方法...
分类:其他好文   时间:2014-07-22 22:40:14    阅读次数:262
hdu-4857-逃生-拓扑排序
拓扑排序。 反向建边。 为了序号小的尽量在前面,我们每次都取出入度为0的最大的点。 #include #include #include #include #include #include #include #include using namespace std; struct list { int u,v,w; int next; }edge[110000]; int ...
分类:其他好文   时间:2014-07-22 22:38:54    阅读次数:265
IOS 判断设备类型
- (NSString*)deviceString{ // 需要#import "sys/utsname.h" struct utsname systemInfo; uname(&systemInfo); NSString *deviceString = [NSString ...
分类:移动开发   时间:2014-07-22 22:35:55    阅读次数:165
C#查看各种变量的指针地址
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { struct XYZ { ...
分类:其他好文   时间:2014-07-22 22:34:55    阅读次数:208
poj2431 Expedition
直接代码、、、 #include #include #include #include #include using namespace std; struct node { int fuel,dist; //bool operator d.dist; // } }s[10005]; ...
分类:其他好文   时间:2014-07-22 22:34:14    阅读次数:178
网络编程Socket之RST详解
产生RST的三个条件: 1. 目的地为某端口的SYN到达,然而该端口上没有正在监听的服务器; 2. TCP想取消一个已有的连接; 3. TCP接收到一个根本不存在的连接上的分节;  现在模拟上面的三种情况: client: struct sockaddr_in serverAdd; bzero(&serverAdd, sizeof(serverAdd));...
分类:其他好文   时间:2014-07-22 17:57:21    阅读次数:333
【足迹C++primer】50、避免含糊转换
避免含糊转换 参数匹配和相互转换 struct B; struct A { A()=default; A(const B&) //吧B负责给A,拷贝构造函数 {//嘿,这里我有点明白了,只要 后面调用了这个函数,那么这个函数就得有定义 //不能只声明不定义 cout<<"调用了A(const B&)转换!"<<endl; }...
分类:编程语言   时间:2014-07-22 14:43:26    阅读次数:297
线段树单点更新区间最大值 hdoj1754I Hate It
题目:hdoj1754 I  Hate It 分析:更新的话,建树的时候保存叶子编号的的节点信息,然后从下往上更新就ok。 求和的话,从根节点开始,然后找在根的左边还是右边,然后递归找一个所有中的最大值即可、 代码: #include #include #include using namespace std; const int N = 205000; struct...
分类:其他好文   时间:2014-07-22 14:33:36    阅读次数:179
C和指针 (pointers on C)——第十章:结构体和联合(下)习题
//1、这一章的习题纯粹为了刷存在感。。。 typedef struct phone { char * quhao; char * jiaohuantai; char * zhanhaoma; }; typedef struct call { char * date; char * time; phone * shiyong; phone * self; phone * huji...
分类:其他好文   时间:2014-07-21 23:16:53    阅读次数:177
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!