图同构。一个神奇的算法居然0ms过。真是不科学。反例可以构造出来。还是没有针对他的数据。#include #include #include #include using namespace std;struct position{ int x,y; }pos[10010];in...
分类:
其他好文 时间:
2014-07-22 22:55:55
阅读次数:
147
Trie树,第一次写,简单的建树+搜索它的思路hiho上讲得很清楚,good~ 1 #include 2 #include 3 using namespace std; 4 char word[11]; 5 int n,m; 6 struct trie 7 { 8 int num; 9 ...
分类:
其他好文 时间:
2014-07-19 21:17:39
阅读次数:
205
修改其值的最快方式:创建:Mutable StorageTo create mutable storage for a buffer object, you use this API:voidglBufferData?(enum target, sizeiptr size, const void *...
分类:
其他好文 时间:
2014-07-19 21:10:18
阅读次数:
425
1链表逆序http://blog.csdn.net/niuer09/article/details/5961004typedef struct tagListNode{ int data; struct tagListNode* next;}ListNode, *List;List Re...
分类:
其他好文 时间:
2014-07-19 20:28:12
阅读次数:
188
枚举两点,然后同步BFS,看代码吧,很容易懂的。代码:#include #include #include #include #include #include #include #define Mod 1000000007using namespace std;struct Point{ i...
分类:
其他好文 时间:
2014-07-19 20:21:38
阅读次数:
245
1 /** 2 * 二叉树的前序、中序、后序遍历的递归和非递归算法实现 3 **/ 4 5 //二叉链表存储 6 struct BTNode 7 { 8 struct BTNode *LChild; // 指向左孩子指针 9 ELEMENTTYPE ...
分类:
其他好文 时间:
2014-07-17 00:00:56
阅读次数:
241
#include #include typedef struct A{ int a:5; int b:3; unsigned c:8; unsigned d:8;} Type_A;/* VS2010, Windows XP, Debug模式下运行 */int main(void){ struc...
分类:
其他好文 时间:
2014-07-16 16:47:14
阅读次数:
210
在分析安卓源码过程中看到几处使用变长结构体的例子,比如下面的结构体:
struct command
{
/* list of commands in an action */
struct listnode clist;
int (*func)(int nargs, char **args);
int nargs;
char *args[1];
...
分类:
其他好文 时间:
2014-07-16 16:16:29
阅读次数:
381
1.声明一个学生类的 结构体struct Student{int age;char name[20];//长度为20的字符串int weiht;//像正常一样的申请变量,这个变量属于结构体的一部分};//这分号 必须有,不然报错结构体和类差不多,必须有对象才能操作,如:stcuct Stdent s...
分类:
其他好文 时间:
2014-07-16 14:55:59
阅读次数:
180
ovs 对于 OFPT_SET_CONFIG消息的处理过程非常简单,其实就是通过TCP协议(或其它)交换了几个整型值,而且交换机不需要对此消息进行回复;只需要解析出消息体(struct ofp_switch_config)然后设置max miss len 即可。通过分析Floodlight发送它的过程 和 OVS
处理它的过程,我们可以对openflow协议有更好的理解。下面是代码流程:
...
分类:
其他好文 时间:
2014-07-16 12:56:41
阅读次数:
260