懒懒散散刷了70+
从?现在重新?回顾算法??????
图论开始好了:
18/9/3
最短路径
dijkstra + 最短路径记录1030 https://blog.csdn.net/jinixin/article/details/52247763
floyd + 最短路径记录...一般来说用于100内的 https://blog.csdn.net/jeffleo/article/details/53349825
spfa 嘻嘻嘻哈哈哈不管了
bfs:pat1091水,???可是我太久没有写了都不会写了 然后需要去vj上做两三题试试? 尚未完成任务
dfs:1130? get 是语法树 1131?? 上天吧你老子不会
拓扑?? 会 不写了
匈牙利?https://blog.csdn.net/galesaur_wcy/article/details/79901614
最小生成树, prim算法:https://blog.csdn.net/galesaur_wcy/article/details/82386418
kraskal熟悉
还有关键路径是什么鬼??? 拓扑排序 get
树:
先序中序后序遍历 get
先序中序建树 get
后序中序建树 get
层序建立树 get
二叉搜索树 呃呃呃 删除这块不太会
如果两个节点都存在的话选择右子树最小的 或者是 左子树 最大的作为根节点
之后递归的删除
平衡二叉树AVL....这边的话......就是??????任一节点的左右子树高度的差的绝对不止不超过
有两题?1123 1066 get
还有散列 平方探测和线性探测 emmm 1078还有哪里来着 get
STL复习 get 复习完成 然后接下来是?
关闭同步:std::ios::sync_with_stdio(false) 还有需要注意下的就是说....emmm中途就不要用scanf和printf了 不然可能会有???问题???? 之前遇到够这个事情 std::ios::sync_with_stdio(false)
stringstream sprintf scanf
#include <iostream>
#include <algorithm>
#include <sstream>
using namespace std;
int main()
{
std::ios::sync_with_stdio(false);
stringstream ss;
string s;
getline(cin,s);
ss<<s; //输入到这里面来
while(ss>>s)
cout<<s<<endl;
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
char str[100];
sscanf("12345","%4s",str);
printf("str = %s\n",str);
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
char buffer[10];
char *a = "1234";
char *b = "5678";
sprintf(buffer, "%s%s", a, b);
sprintf(buffer, "%d",12345);
printf("%s\n", buffer);
return 0;
}
树状数组√ https://blog.csdn.net/galesaur_wcy/article/details/76902206
动态规划
0-1揹包1068√
完全揹包√
多重揹包 二进制优化 √ https://blog.csdn.net/galesaur_wcy/article/details/80385462
贪心算法.....
LIS,,,,LCS √
好其他的都上天吧 老子不学
排序..........................考这个我就上天
69分 250/2237
暴风哭泣 差点打开浏览器
分值分布
2,25,22,20
第一题暴力题我XXXXXXXXX行吧我就没往那边想...............卡了一小时
第二题自己浪费时间写的不咋地
第三题不知道错在哪里
第四题....2个25分的题 呃呃呃之前写过了也知道怎么做。结果呢?该不会继续不会
等来年12月了 我脑袋疼
嗯懒散了2个月我还是决定再考一次吧 总不能一次69就不行了还有我可怜的六级 加油啊
希望6级过还有pat 加油啊
2018/12/5
树
。。。。。。中间两个月没刷题。。现在刷到137 不过有些都忘记了 现在开始重新复习一次
AVL插入调整重新复习
1066 https://blog.csdn.net/galesaur_wcy/article/details/82492540
1123 https://blog.csdn.net/galesaur_wcy/article/details/82468788 建树 层序遍历还有? 判断是否是完全二叉树
二叉搜索树的层序前序中序后序遍历 还有二叉搜索树的建立删除操作 还有根据
前序中序建树 https://blog.csdn.net/galesaur_wcy/article/details/81514986
中序后序建树嗯这个也简单 https://blog.csdn.net/galesaur_wcy/article/details/84026940
前序后序也建树即便不唯一 1119 https://blog.csdn.net/galesaur_wcy/article/details/84791435 如果存在单节点的话 那么就无法判断了 所以就是单双节点的问题。。。。over
还有一些什么平方探测法线性探测法 这个 平方探测 https://blog.csdn.net/galesaur_wcy/article/details/81234201#comments
其中平方探测以正向递增。。。。英文是Quadratic probing (with positive increments only) is used to solve the collisions. 哭了
我看不懂 Quadratic probing 这个
这三种方法分别是线性探测、二次探测和再哈希法。
These methods are linear probing, quadratic probing, and double hashing
方法有 直接定址法 除留余数法 字符的有 ASCII加和码 还有 前3位字符以移位法key[0] + key[1] * 27 + kety[2] * 27 * 27
二叉搜索树删除操作 以及。。。。二叉搜索树 的性质 LCA算法
树就复习的差不多了
2018/12/7
dijkstra + 最短路径记录+记录路径 https://blog.csdn.net/galesaur_wcy/article/details/84302761
floyd + 最短路径记录...一般来说用于100内的 https://blog.csdn.net/jeffleo/article/details/53349825 get
kraskal熟悉
最小生成树, prim算法:https://blog.csdn.net/galesaur_wcy/article/details/82386418 get
bfs:pat1091水
dfs:1130? get 是语法树 1131?? 上天吧你老子不会
匈牙利?https://blog.csdn.net/galesaur_wcy/article/details/79901614
各种排序:
冒泡排序
插入排序
希尔排序 by Donald Shell
选择排序
堆排序
归并排序
归并分治思想
非递归
排序代码详见:https://blog.csdn.net/galesaur_wcy/article/details/84885766
接下来是堆排序//自己写一个好了。。。排序复习完了 12/7/20.22
12/8
树状数组求中位数+二分 https://blog.csdn.net/galesaur_wcy/article/details/81668135
树状数组求逆序数:https://blog.csdn.net/galesaur_wcy/article/details/84890765
动态规划:
多重揹包就是01+二进制优化
01揹包 完全揹包 LIS https://blog.csdn.net/galesaur_wcy/article/details/77169725
LCS 就是DP嘛。。。。。复习OVER
二分 get 讲的很不错。。至少我觉得很有道理还能写的那种 https://www.cnblogs.com/luoxn28/p/5767571.html
STL 复习好啦。。。
贪心 做几道题~~~
LCA算法:
2018/12/09甲级
96分。。分值分布20,21,25,30
心塞,其实不到两小时就做完了,剩下的就是改第一题和第二题的bug 第一题的bug其实是自己写代码的问题。。后来通过测试知道是自己问题改出来了,。。。。然后就是第二题。。。简直就是耗费一小时在改这一题的bug 改的我心累
从16->21 甚至重新写了 就是不知道自己哪里有问题。。。。只能等会了
卧槽。。。。。是格式问题比如090908我会输出90908 所以啊。。。这种东西以后要注意啊
这次题巨简单。。。比上次比 简单到爆。。。
好吧 pat到现在结束了,该准备六级+期末了
大约还有10+题没写 等期末结束后用Java写吧。。。。再更新pat题集。。现在。。