「Binary Tree」Extension

在普通的二叉树(链式结构)上增加了一些功能 bitree.h typedef int Status; typedef int TElemType; typedef struct BiTNode { TElemType data; struct BiTNode *lchild, *rchild; } BiTNode, *BiTree; Status InitBiTree(BiTree *T); Status...

「Editor」

Assuming that the string is initially empty, the basic operations that can be performed are append/insert/delete/replace, as described below: append: Appends a string of the...

Sparse Matrix (Orthogonal Linked List)

简单实现了稀疏矩阵的加法减法乘法和转置 Crosslist.h #include <iostream> using namespace std; #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFEASIBLE -1 #define LOVERFLOW -2...

Sparse Matrix (Triple Table)

简单实现了稀疏矩阵的加法减法乘法和转置 Tsmatrix.h #include <iostream> using namespace std; #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFEASIBLE -1 #define LOVERFLOW -2...

「POJ3061」Subsequence

题目描述 给定长度为n的数列整数a0,a₁,…,an-1以及整数s。求出总和不小于s的连续子序列的长度的最小值。如果解不存在,则输出0。 输入 题目包含多组数据。 输入的第一行有一个整数T  代表有T组数据。 对于每组数据分为两行: 第一行有两个整数n,s (10<n<100,000,s<100,000,000)。 第二行有n个整数ai (0<ai≤10,000)。 样例输入 2 10 15 5 1 3 5 10 7 4 9 2 8...

Assembly (Two)

题目说明: 某学生利用暑期到快递公司打工,该公司以底薪加计件工资的形式,并以周为结算周期给实习学生发工资。具体计薪办法是:实习学生一周工作6天,每周基本工资800元,每天送快递60件为基本要求,每天多送1件增加1.5元,每天不足60件则每少1件扣1.2元。某同学某周内各天的快递量分别为102,90,57,89,48,79。编程计算该实习学生本周能领到多少工资(元)? 代码: DATA SEGMENT NUM DW 102,90,57,89,48,79 DUO DB 15 SHAO DB 12 SALARY DW ? STRING DB 'THE SALARY SHOULD BE : $'...

社会主义下人的灵魂(十一)

好久没更新了啊。马上要到假期了,继续填坑吧。 Now, I have said that the community by means of organisation of machinery will supply the useful things, and that the beautiful things will...

Assembly (One)

It’s been a while since I last updated this website. Final exams have been keeping me busy, and I’ve just completed an intense four-day crash...