05 2018 档案

摘要:参考博客:https://blog.csdn.net/strangedbly/article/details/51137432 hdu 1536 阅读全文
posted @ 2018-05-31 12:05 czh~ 阅读(148) 评论(0) 推荐(0)
摘要:题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=3790 分析:dijkstra没有优化的话,复杂度是n*n,优化后的复杂度是m*logm,n是顶点数,m是边数,所以当边的个数少于n*n时优化后算法效率大大提升,如果大于的话就不能用堆优化了。同时spaf 阅读全文
posted @ 2018-05-29 21:12 czh~ 阅读(182) 评论(0) 推荐(0)
摘要:参考博客:https://blog.csdn.net/lqcsp/article/details/14118871 复杂度:O(n*n) 阅读全文
posted @ 2018-05-29 13:13 czh~ 阅读(249) 评论(0) 推荐(0)
摘要:参考博客:https://blog.csdn.net/qq_35644234/article/details/60875818 题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=2544 例题 hdu 2544 解法1.Dijkstra 复杂度为o(n*n 阅读全文
posted @ 2018-05-27 10:44 czh~ 阅读(203) 评论(0) 推荐(0)
摘要:题目来源:https://vjudge.net/problem/Kattis-programmingtutors 题意: 有n个游客,n个导游,给出他们的坐标,问你怎么匹配可以使他们最大距离最小 题解: 用一个lim变量表示最远可以连接的距离,用二分图匹配,如果可以匹配则这个lim一定符合条件,用二 阅读全文
posted @ 2018-05-26 11:47 czh~ 阅读(162) 评论(0) 推荐(0)
摘要:题目来源:http://poj.org/problem?id=1486 题意: 算出所有独一无二的字母与数字的组合,使二分图完全匹配 我以为所有点都要独一无二匹配时输出匹配方法 题解: 先得到一个完全匹配,然后每次割边,如果某次割边后可以完全匹配,则这条边不是必须的匹配 如果没有完全匹配或必要的组合 阅读全文
posted @ 2018-05-26 04:20 czh~ 阅读(296) 评论(0) 推荐(0)
摘要:参考博客:https://blog.csdn.net/liujc_/article/details/51287019 参考博客:https://blog.csdn.net/acdreamers/article/details/8621130 题目来源:http://poj.org/problem?i 阅读全文
posted @ 2018-05-25 16:33 czh~ 阅读(121) 评论(0) 推荐(0)
摘要:来源:https://vjudge.net/problem/UVA-11300 题意: 有n个人围成一圈,每个人有一定数量的金币,每次只能挪动一个位置,求挪动的最少金币使他们平分金币 题解: 蓝书p6 令x1为1号给2号的金币数,负数代表反方向 x2为2号给3号的金币数 x3为3号给4号的金币数 而 阅读全文
posted @ 2018-05-24 18:17 czh~ 阅读(313) 评论(0) 推荐(0)
摘要:来源:http://acm.hdu.edu.cn/showproblem.php?pid=2063 题意: 有k个组合a,b组合,代表a愿意与b坐过山车,共m个女生 n个男生,问有多少个满意的匹配 题解: 这是一道匈牙利算法的裸题,用递归询问是否能安排好某个女生,如果能就ans++ 注意,在同一回合 阅读全文
posted @ 2018-05-23 21:17 czh~ 阅读(322) 评论(0) 推荐(0)
摘要:编辑配置文件 vim .vimrc 阅读全文
posted @ 2018-05-23 17:03 czh~ 阅读(128) 评论(0) 推荐(0)
摘要:打开 vim a.cpp 进入编辑模式 i 退出编辑模式 esc 保存并命名 :w name 退出 :q 保存并退出 :wq 撤销 u 跳行到第n行 :n or ngg 复制 y 剪切 d 粘帖 p 选中当前行,光标位置到行首 ^ HOME键 选中当前行,光标位置到行尾 $ END键 可视化选择 v 阅读全文
posted @ 2018-05-23 15:27 czh~ 阅读(119) 评论(0) 推荐(0)
摘要:删除文件 rm -f /var/abc.cpp 删除文件夹 rm -rf /var 查看安装的所有软件 dpkg -l 删除软件 sudo apt-get remove name 编辑 vim a.cpp or gedit a.cpp 编译 g++ a.cpp -o main 运行 ./main 阅读全文
posted @ 2018-05-23 14:44 czh~ 阅读(127) 评论(0) 推荐(0)
摘要:参考博客:https://www.byvoid.com/zhs/blog/c-int64 阅读全文
posted @ 2018-05-22 09:28 czh~ 阅读(240) 评论(0) 推荐(0)
摘要:题目地址:https://www.icpc.camp/contests/6CP5W4knRaIRgU 比赛的时候知道这题是用主席树+二分,可是当时没有学主席树,就连有模板都不敢套,因为代码实在是太长了。 题意:给你一些数字,要求你某些区间中找到一个h-index。 每次查找h-index复杂度不能超 阅读全文
posted @ 2018-05-16 18:01 czh~ 阅读(220) 评论(0) 推荐(0)
摘要:空间大小:n*lgn 复杂度:建树n*lgn 查询lgn 阅读全文
posted @ 2018-05-16 16:23 czh~ 阅读(117) 评论(0) 推荐(0)
摘要:参考博客:http://www.cnblogs.com/chendl111/p/6891770.html 题目链接:https://www.icpc.camp/contests/4mYguiUR8k0GKE Parentheses Input The input contains zero or m 阅读全文
posted @ 2018-05-11 18:31 czh~ 阅读(157) 评论(0) 推荐(0)
摘要:链接:https://www.icpc.camp/contests/4mYguiUR8k0GKE Partial Sum Input The input contains zero or more test cases and is terminated by end-of-file. For ea 阅读全文
posted @ 2018-05-11 16:15 czh~ 阅读(276) 评论(0) 推荐(0)
摘要:链接:https://www.icpc.camp/contests/4mYguiUR8k0GKE H. Highway The input contains zero or more test cases and is terminated by end-of-file. For each test 阅读全文
posted @ 2018-05-11 09:55 czh~ 阅读(184) 评论(0) 推荐(0)
摘要:链接:https://www.nowcoder.com/acm/contest/105/G 题意: 给出公式, 题解: 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int mod=1000000007; 4 struct qx 5 阅读全文
posted @ 2018-05-05 08:12 czh~ 阅读(192) 评论(0) 推荐(0)
摘要:lis:最长递增子序列 复杂度:$O(nlgn)$ 1 #include<iostream> 2 #include<cstdio> 3 using namespace std; 4 int num[55],lis[55],res=0; 5 int solve(int x) 6 { 7 int a=1 阅读全文
posted @ 2018-05-02 14:40 czh~ 阅读(265) 评论(0) 推荐(0)