Given a binary tree struct TreeLinkNode { 
TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next 
pointe...
                            
                            
                                分类:
其他好文   时间:
2014-07-22 23:16:35   
                                阅读次数:
373
                             
                    
                        
                            
                            
                                一、使用Windows API创建一个窗口二、创建一个Swap Chain(交换链) 
这一步需要用到一个名为DXGI_SWAP_CHAIN_DESC的结构体,其详细定义如下:typedef struct DXGI_SWAP_CHAIN_DESC 
{ DXGI_MODE_DESC Buffer...
                            
                            
                                分类:
其他好文   时间:
2014-07-22 23:13:54   
                                阅读次数:
520
                             
                    
                        
                            
                            
                                /************ PID算法(C语言) ************/ #include 
#include struct _pid { int pv; /*integer that contains the process value*/ int 
sp; /*integ...
                            
                            
                                分类:
编程语言   时间:
2014-07-22 23:12:56   
                                阅读次数:
447
                             
                    
                        
                            
                            
                                /** * Definition for binary tree * struct 
TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : 
val(x), left(...
                            
                            
                                分类:
其他好文   时间:
2014-07-22 23:07:34   
                                阅读次数:
312
                             
                    
                        
                            
                            
                                1、顺序表顺序表的定义 #define MaxSize 100 ElemType 
Sqlist[MaxSize]; int len;相当于 int a[100];动态生成一张顺序表的方法可描述如下:#define MaxSize 
100typedef struct{ElemType *elem...
                            
                            
                                分类:
其他好文   时间:
2014-07-22 23:06:15   
                                阅读次数:
277
                             
                    
                        
                            
                            
                                题意:给n,m,k;输出n经过+-*%后(n%k+k)%k==((n+1)%k)%k 
输出最小路径与运算副zsd:% 只是求余数 有正负 mod 是求模 无正负、yhd:对m*k求余对 对k求余不对#include#includeusing 
namespace std;struct Node{ .....
                            
                            
                                分类:
其他好文   时间:
2014-07-22 23:06:14   
                                阅读次数:
369
                             
                    
                        
                            
                            
                                题目来源:http://poj.org/problem?id=3384分析:用半平面交将多边形的每条边一起向“内”推进R,得到新的多边形(半平面交),然后求多边形的最远两点。代码如下:const 
double EPS = 1e-10;const int Max_N = 105 ;struct Poi...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 14:35:31   
                                阅读次数:
528
                             
                    
                        
                            
                            
                                DP+贪心优化。 1 #include 2 #include 3 #include 4 5 
#define MAXNUM 105 6 7 typedef struct { 8 int exp, deg; 9 } info_st;10 11 
info_st infos[MAXNUM]...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 00:26:21   
                                阅读次数:
330
                             
                    
                        
                            
                            
                                背包问题时间限制:3000ms | 
内存限制:65535KB难度:3描述现在有很多物品(它们是可以分割的),我们知道它们每个物品的单位重量的价值v和重量w(1#include#include#include 
#include#includeusing namespace std;struct ba....
                            
                            
                                分类:
其他好文   时间:
2014-04-30 15:46:29   
                                阅读次数:
443
                             
                    
                        
                            
                            
                                poj 1279 求半平面交的 
面积题目来源:http://poj.org/problem?id=1279分析: 求半平面交的 面积代码如下:const double EPS = 
1e-8;const int Max_N = 1505;struct Point{ double x,y; ...
                            
                            
                                分类:
其他好文   时间:
2014-04-29 16:35:46   
                                阅读次数:
499