随笔分类 - 数据结构
摘要:DescriptionYou have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a cle...
阅读全文
摘要:实现两个多项式的加法 ---------------------------------优先队列版本#include#include#includeusing namespace std;class Multiploy{ double x; //系数 int y; //指数public: Mu...
阅读全文
摘要:今天重新看了下关于全排列的递归,觉得这个算法这是太精妙了。 首先,求n个数的全排列,可先求出n-1个数的全排列,这就利用了递归;其次,由于全排列有顺序之分,某一个确定的数可以在任意的位置上,即有n种情况,这就可以利用for循环。templatevoid Perm(T list[],int k,in...
阅读全文
浙公网安备 33010602011771号