#include
#include
#include
#include
#include
#include
static char abc_str[32] =
{ };
static char blob_inof[32] = "dragon blob wrapper\n";
static struct debugfs_blob_wrapper blob;
s...
分类:
其他好文 时间:
2014-09-05 11:26:51
阅读次数:
182
重建二叉树结构,给定了前序和中序,重建树形结构#include #include using namespace std;/*给定前序,中序,重建树结构例如假定:前序:adbcef中序:dbaecf后序:dbefca*/struct NODE{ NODE *pLeft; NODE *pR...
分类:
其他好文 时间:
2014-09-05 08:45:01
阅读次数:
317
与进程联系的文件结构的关系示意图struct file{ struct list_head f_list; /*所有打开的文件形成一个链表*/ struct dentry *f_dentry; /*指向相关目录项的指针*/ struct vfsmount ...
分类:
其他好文 时间:
2014-09-04 23:39:30
阅读次数:
226
一开始的思路是:中序遍历+判断遍历后的数组,时间空间都不是最优果然超时了 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * ...
分类:
其他好文 时间:
2014-09-04 23:35:50
阅读次数:
393
1 //Accepted 7172 KB 515 ms 2 //基础线段树 3 #include 4 #include 5 #include 6 using namespace std; 7 const int imax_n = 200005; 8 struct ...
分类:
其他好文 时间:
2014-09-04 23:34:30
阅读次数:
269
【问题】
单链表逆序
【代码】
#include
#include
#include
typedef struct ListNode {
int value;
struct ListNode *next;
}ListNode;
typedef struct ListNode *List;
List reverseList(List head) //列表逆序
{
List...
分类:
其他好文 时间:
2014-09-04 22:24:30
阅读次数:
328
递归 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode...
分类:
其他好文 时间:
2014-09-04 22:16:00
阅读次数:
228
快速幂模+佩尔方程#include #include #include #include const int Mod=8191;struct Matrax { int m[3][3];};Matrax a,per;void slove(int d,int &x1,int &y1){ y1=1; wh...
分类:
其他好文 时间:
2014-09-04 22:13:20
阅读次数:
233
思路 1. 通信 为了同步双方的棋盘,每当一方在棋盘上落子之后,都需要发送给对方一个msg消息,让对方知道落子位置。msg结构体如下: /* 用于发给对方的信息 */typedef struct tag_msg{ int msg_type; /* 悔棋? */ int msg_color; int ...
分类:
系统相关 时间:
2014-09-04 22:09:30
阅读次数:
375
继续上一次的旋转卡壳的问题,这次是求两个凸包的最短距离,
其实选择卡壳就是只要找到"当前向量面积不小于下一个向量面积"即可,
满足这个条件,当前的两个ymin和ymax点就是一对对踵点了。
代码如下,欢迎参考:
#include
#include
#include
using namespace std;
typedef struct{float x,y;} Dot;
Dot operat...
分类:
其他好文 时间:
2014-09-04 20:57:40
阅读次数:
397