日期与时间
struct tm {
        int tm_sec;     /* 秒 – 取值区间为[0,59] */
        int tm_min;     /* 分 - 取值区间为[0,59] */
        int tm_hour;    /* 时 - 取值区间为[0,23] */
        int tm_mday;    /* 一个月中的日期...
                            
                            
                                分类:
其他好文   时间:
2014-07-22 23:03:55   
                                阅读次数:
279
                             
                         
                    
                        
                            
                            
                                1 #include 2 #include 3 #include 4 #define 
INIT_STACK_SIZE 100 5 typedef struct 6 { 7 char * chOperator; 8 int dwtop; 9 
}OPND;10 11 void I...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 20:37:37   
                                阅读次数:
373
                             
                         
                    
                        
                            
                            
                                1 /* PRESET CODE BEGIN - NEVER TOUCH CODE BELOW */ 
2 3 #include 4 #include 5 6 typedef struct node 7 { int coef, exp; //coe...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 20:33:27   
                                阅读次数:
342
                             
                         
                    
                        
                            
                            
                                1 #include 2 #include 3 4 typedef struct mdata 5 { 
6 int *pTime; 7 int width; 8 int hight; 9 struct mdata *pre; 10 st...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 20:32:48   
                                阅读次数:
348
                             
                         
                    
                        
                            
                            
                                1 #include 2 #include 3 #include 4 #define 
INIT_STACK_SIZE 100 5 typedef struct 6 { 7 char * chOperator; 8 int dwtop; 9 
}OPND;10 11 void I...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 20:32:11   
                                阅读次数:
366
                             
                         
                    
                        
                            
                            
                                先用bfs预处理出层次图,然后在层次图上用dfs找增广路径,理论复杂度O(n*n*m)const 
int INF=0xfffffff ;struct node{ int s,t,cap,nxt ;}e[200005] ;int 
m,n,head[10005],level[10005],cnt ...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 20:05:16   
                                阅读次数:
379
                             
                         
                    
                        
                            
                            
                                输入 1500 3150 300100 200 输出结果470 471100 200150 
300470 471 #include #includeusing namespace std;struct node{ int a ; int 
b;}s[100];int compare(const voi...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 19:12:33   
                                阅读次数:
358
                             
                         
                    
                        
                            
                            
                                题目:寻找最长上升自序列。
代码:
#include 
#include 
#include 
#include 
using namespace std;
struct node
{
    int w,s;                //重量,速度
    int num;             //编号
    int t;                   //用来记录当前编号...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 17:17:32   
                                阅读次数:
285
                             
                         
                    
                        
                            
                            
                                0长度的数组在ISO C和C++的规格说明书中是不允许的,但是由于gcc 预先支持C99的这种玩法,所以,“零长度数组”在gcc环境下是合法的。
先看下面两个例子。
pzeroLengthArray.c
#include 
struct str
{
	int len;
	char *s;
};
struct foo
{
	struct str *a;
};
int main()
{...
                            
                            
                                分类:
其他好文   时间:
2014-04-30 22:22:39   
                                阅读次数:
300
                             
                         
                    
                        
                            
                            
                                代码:
        if((server_fd = accept(sockfd,(struct sockaddr *)&server_addr, &sin_size)) == -1)
        {
            fprintf(stderr, "Accept error:%s\n\a", strerror(errno));
            exit(1);...
                            
                            
                                分类:
其他好文   时间:
2014-04-30 22:21:38   
                                阅读次数:
765