01 2018 档案
摘要:王道P37 T5 所谓原地逆置,就是空间复杂度为O(1)的将链表反转。 实现函数: 完整代码: #include <cstdio> #include <stdlib.h> using namespace std; typedef struct LinkList{ int data; struct L
阅读全文
摘要:王道P37 T1 : 设计一个递归算法,删除不带头结点的单链表L中所有值为x的结点。 王道上的答案绝对是错的,我自己想了一个 函数主体 调用方法: 完整代码: #include <stdlib.h> #include <cstdio> using namespace std; typedef str
阅读全文
摘要:这题写得头晕……明天我再评价 #include <stdio.h> #include <memory.h> #include <math.h> #include <string> #include <vector> #include <set> #include <stack> #include <
阅读全文
摘要:1. apt-get install qt5-designer 2.终端下输入designer,显示: designer: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/designer': No such file or directory 3
阅读全文
摘要:1.echo变量名的技巧 在这一行代码中,先输入a的值,是一个字符串。然后通过declare命令通过字符串“a”来定义ai的整数值,然后我们想把ai输出出来,可以直接用echo "ai=$ai"来完成。但是如果我们想在后面再输出一些字符串呢?可以用一个空格分隔,然后定义想要输出的字符串。然是如果我们
阅读全文
摘要:#include <stdio.h> #include <memory.h> #include <math.h> #include <string> #include <vector> #include <set> #include <stack> #include <queue> #include
阅读全文
摘要:王道P18 T11 输入两个长度相同的升序数组,返回这两个数组合并后的中位数 C++代码: 完整代码: #include <cstdio> #include <memory.h> #include <cmath> #include <string> #include <vector> #includ
阅读全文
摘要:写了三遍才AC,这真是对智商极大的侮辱 C++代码: #include <stdio.h> #include <memory.h> #include <math.h> #include <string> #include <vector> #include <set> #include <stack
阅读全文
摘要:花了一下午鼓捣了高精度加法函数。 一下代码中multi函数用string做容器,存在溢出的问题,可改为vector<int>或vector<long long>
阅读全文

浙公网安备 33010602011771号