#include #include #include typedef int DataType;//
稀疏矩阵的十字链表存储表示typedef struct LNode{ int i,j; // 该非零元的行和列下标 DataType e; // 非零元素值
struc...
分类:
其他好文 时间:
2014-05-25 23:13:33
阅读次数:
295
HDU 4832 Chess
思路:把行列的情况分别dp求出来,然后枚举行用几行,竖用几行,然后相乘累加起来就是答案
代码:
#include
#include
#include
using namespace std;
typedef long long ll;
const ll MOD = 9999991;
const int N = 1005;
int t, n, m, ...
分类:
其他好文 时间:
2014-05-25 21:55:04
阅读次数:
280
??
// //广度优先遍历二叉树
// //从一个顶点开始,识别所有可到达顶点
// //的方法叫作广(宽)度优先搜索,这种
// //搜索可使用队列来实现
typedef struct binarytree
{
EleType data;
struct binarytree *LeftChild;
struct binarytree *RightChild...
分类:
其他好文 时间:
2014-05-25 18:25:35
阅读次数:
316
进程结构
Linux0.12中的每个进程都有如下的结构:
在gdt中占有两项,一项是tss段描述符,一项是ldt段描述符。
在task数组中占有一项,指向一页物理内存,该物理内存低端是进程控制块task_struct(里面包括tss段和ldt段),其余部分是进程的内核态堆栈。
在页目录表和页表中设置有相关项。
Linux0.12中,最多只有64个进...
分类:
系统相关 时间:
2014-05-25 18:19:08
阅读次数:
329
//简单.... 1 #include 2 #include 3 #include 4
using namespace std; 5 6 #define maxn 105 7 8 struct t 9 {10 int s;11 int e;12
};13 14 t T[maxn]...
分类:
其他好文 时间:
2014-05-25 16:04:07
阅读次数:
215
题目链接:uva 12075 - Counting Triangles
题目大意:一个n?m的矩阵,求说有选任意三点,可以组成多少个三角形。
解题思路:任意选三点C(3(n+1)?(m+1))但是有些组合是不可行得,即为三点共线,除了水平和竖直上的组合,就是斜线上的了,dp[i][j]即为ij情况下的斜线三点共线。
#include
#include
typedef long...
分类:
其他好文 时间:
2014-05-25 10:55:21
阅读次数:
201
1.链队列结构
typedef struct QNode /* 结点结构 */
{
QElemType data;
struct QNode *next;
}QNode,*QueuePtr;
typedef struct /* 队列的链表结构 */
{
QueuePtr front,rear; /* 队头、队尾指针 */
}LinkQueue;...
分类:
编程语言 时间:
2014-05-25 10:25:15
阅读次数:
325
形态:
实现:
/***************************************8
二叉树的三叉链表存储
by Rowandjj
2014/5/23
*****************************************/
#include
using namespace std;
typedef int ElemType;
//------...
分类:
其他好文 时间:
2014-05-25 08:52:26
阅读次数:
239
1. 循环队列的顺序存储结构
typedef struct
{
QElemType data[MAXSIZE];
int front; /* 头指针 */
int rear; /* 尾指针,若队列不空,指向队列尾元素的下一个位置 */
}SqQueue;
2. 初始化一个空队列Q
Status InitQueue(SqQueue *Q)
{
Q->fr...
分类:
编程语言 时间:
2014-05-25 04:43:05
阅读次数:
407