04 2018 档案

摘要:1. In general, any machine learning problem can be assigned to one of two broad classifications: Supervised learning and Unsupervised learning. 2. Def 阅读全文
posted @ 2018-04-21 07:21 Travelller 阅读(153) 评论(0) 推荐(0)
摘要:深度优先搜索和广度优先搜索 1. 思路 深度优先搜索伪代码: 广度优先搜索伪代码: 2. 适用范围——如何判断用深搜还是广搜? DFS:可以不重不漏枚举所有可达目标状态的路径。 BFS:效率高,适用于找最快到达目标状态的路径。占用空间大。 ① “最快”、“最短”、“最近”——广搜 ② 没有深度限制, 阅读全文
posted @ 2018-04-11 12:00 Travelller 阅读(237) 评论(0) 推荐(0)
摘要:并查集(Union-find Sets) 一 组成 并查集是一种用于处理一些不相交集合的合并问题的数据结构。主要由一个数组和两个函数组成。 数组:pre[] 用于记录每个点的前导节点。 函数:find() 查找根节点。路径压缩。 图 1 调用find()进行路径压缩 join() 合并两个联通分量。 阅读全文
posted @ 2018-04-10 22:52 Travelller 阅读(186) 评论(0) 推荐(0)
摘要:<cstring> memset(a,0,sizeof(a)); <algorithm> sort(a,a+20); 阅读全文
posted @ 2018-04-10 09:55 Travelller 阅读(163) 评论(0) 推荐(0)
摘要:A 2152 Phone Number:水 #include <cstdio> #include <cstring> #include <algorithm> #include <iostream> using namespace std; int cmp(string a,string b) { 阅读全文
posted @ 2018-04-10 09:53 Travelller 阅读(203) 评论(0) 推荐(0)