- 博客(15)
- 收藏
- 关注
转载 数据结构总结
STL中数据结构通用操作 1.1二分查找 1.2排列生成栈 2.1单调栈队列 3.1优先队列 3.2单调队列向量链表 5.1链式前向星 5.2舞蹈链(dancing links)堆 6.1映射二叉堆集合映射ST表并查集 *10.1带权并查集 *10.2种类并查集 *...
2019-09-13 21:50:47 295 1
原创 anaconda安装graphviz
anaconda安装graphviz1 下载对应版本https://www2.graphviz.org/Packages/stable/portable_source/2 安装 一路next3 添加环境变量,用户变量:C:\Program Files\Graphviz 2.44.1\bin系统变量:C:\Program Files\Graphviz 2.44.1\bin\dot.exe4 打开终端 dot -version如果出现版本信息,libdir=…则安装成功否则提示有个dot -c,要
2020-10-15 19:29:37 245
原创 A - Max Sum Plus Plus HDU - 1024题解
Problem DescriptionNow I think you have got an AC in Ignatius.L’s “Max Sum” problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now you are faced with a more diffi...
2019-10-27 11:43:16 250
原创 ubuntu18.04安装显卡驱动
1 开机在系统界面选择ubuntu 按e,将splash后面改为nomodeset 按F10进入系统2 禁用nouveausudo vim /etc/modprobe.d/blacklist-nouveau.confblacklist nouveauoptions nouveau modeset=0如果没有vim的话 安装vimsudo apt -get install vim3重启...
2019-10-24 14:01:55 255
原创 Codeforces Round #372 (Div. 2) -- C. Plus and Square Root
直接找规律就可以打表开始是2,+2后,变成4,开方变成2,等级为2, 2/2 = 1然后2 + 172 = 36,开方后变成6 等级为3, 6/3 = 2然后6 + 46 3 = 144,开方后变成12 等级为4 12/4 = 3然后12 + 974 = 400 开方后变成20 等级为5, 20/5 = 4那么第k项就是(k(k+1)* k * ( k + 1 ) - (k...
2016-09-18 15:45:00 101
原创 Codeforces Round #372 (Div. 2), problem: (B) Complete the Word
水题,每次截取长度为26的字符串,然后直接进行修改就可以然而本弱渣昨天wa看很久include<bits/stdc++.h>using namespace std;int n,c;int ans[30];int main(){string s;cin>>s;int tt=0;int n=s.size();if(n<26){cout...
2016-09-18 15:42:00 108
原创 Codeforces Round #372 (Div. 2), problem: (A) Crazy Computer 水题
#includeusing namespace std;int n,c;int a[1000000];int main(){ cin>>n>>c; if(n==1) { cout<<1<>a[i]; } for(int i=0;i ...
2016-09-18 15:39:00 58
原创 codeforce 14D 无向图 求树的长度 bfs是一种方法 先用dfs做
枚举每一条边 将树分为两部分 分别dfs求出树的直径 从一点开始最长路加次长路为树的直径#include<iostream>#include<vector>#include<algorithm>using namespace std;vector<int> G[100000];int n,s;inline int max(...
2016-07-22 13:43:00 73
原创 图论 邻接表实现 动态数组实现
#include<iostream>#include<vector>#include<algorithm>using namespace std;struct edge{ int to,cost;};vector<edge> G[10000];int main(){ int v,e; while(cin>...
2016-07-22 09:29:00 154
原创 Codeforces Round #177 (Div. 2)---E. Polo the Penguin and XOR operation
题意:让你构造一个序列,使得序列异或和最大,序列为n 的全排列 ,序列和计算方式为 SUM = a[1] ^ 0 + a[2] ^ 1 + a[3] ^ 2 + .......a[n] ^ n感想 :之前没做过有关位运算的题,对这一块很陌生,两个数异或以后,如果二进制每一位都为1,那么一定最大,找规律发现当n为偶数时 除开0以外,其他的都是成对出现当n为奇数时 都是成对出现 例如...
2016-07-21 21:12:00 91
原创 cf 121 E 线段树解法
题意:给n个数 m次操作 操作方式为 count 统计区间里的幸运数字都多少个 add给区间里每个数都加上一个值网上的大牛都是用树状数组写的 线段树也可以解决 只是有点悬 刚学线段树 借此加强知识储备和代码能力 线段树单点更新 谢谢各位指教#include<iostream>#include<cstdio>#include<cst...
2016-07-21 19:11:00 113
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人