快速矩阵乘法。注意,原始字符串即为decode后的字符串。题目是要找到原始串。 1 #include 2 #include 3 4 #define MAXN 85 5 6 typedef struct { 7 char m[MAXN][MAXN]; 8 } mat_st; 9 10 ...
分类:
其他好文 时间:
2014-07-23 12:38:56
阅读次数:
259
暴力搜索 1 #include 2 3 struct node 4 { 5 int x; 6 int y; 7 }s[10000]; 8 int main() 9 {10 //freopen("input.txt","r",stdin);11 int a,b,n,n...
分类:
其他好文 时间:
2014-07-23 11:58:36
阅读次数:
293
1.单向循环链表
区分单向链表和单向循环链表:单向循环链表的尾指针指向头结点。
2.单向循环链表的基本操作
#include
#include
#define NULL 0
typedef struct node {
int data;
struct node *next;
}ElemSN;
ElemSN * creat_link(int ms); //创建一个单向循环链表
...
分类:
其他好文 时间:
2014-07-22 23:50:48
阅读次数:
264
??
内存对齐概念,struct例子:
struct stu{
char a;
intb;
char c;
double d;
char e;
}
取pack(n),n,取结构体中最大成员大小m,取两个小值k, k = m
取每个成员大小p,依次同k比较,取小值q = k
第二步当中依次取...
分类:
其他好文 时间:
2014-07-22 23:48:17
阅读次数:
283
遍历线段树 线段树的插入和查询 1 //城市地平线(线段树) 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 typedef __int64 LL; 9 struct building{....
分类:
其他好文 时间:
2014-07-22 23:08:12
阅读次数:
175
用cocos2d-x获取系统时间,格式为年月日时分秒:void GetTime(float dt) { struct tm *tm;#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) //win32平台 time_t timep; ...
分类:
其他好文 时间:
2014-07-22 23:06:32
阅读次数:
355
1.进程描述符 struct task_struct { volatile long state; ....... struct list_head tasks; ....... struct mm_struct *mm, *active_mm; ....... struct v...
分类:
系统相关 时间:
2014-07-22 22:47:52
阅读次数:
371
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { struct XYZ { ...
分类:
其他好文 时间:
2014-07-22 22:34:55
阅读次数:
208
直接代码、、、
#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
产生RST的三个条件:
1. 目的地为某端口的SYN到达,然而该端口上没有正在监听的服务器;
2. TCP想取消一个已有的连接;
3. TCP接收到一个根本不存在的连接上的分节;
现在模拟上面的三种情况:
client:
struct sockaddr_in serverAdd;
bzero(&serverAdd, sizeof(serverAdd));...
分类:
其他好文 时间:
2014-07-22 17:57:21
阅读次数:
333