自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(23)
  • 资源 (9)
  • 收藏
  • 关注

原创 PATj甲级 1087 All Roads Lead to Rome (30 分)dijkstra + dfs

1087 All Roads Lead to Rome (30 分)Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most hap...

2018-10-25 22:19:42 182

转载 upper_bound()和low_bound函数的基本使用和理解

原文链接:https://blog.csdn.net/sdz20172133/article/details/80101838前提:一个非降序列!!!!!!lower_bound()函数使用:它的参数就是:1.一个数组元素的地址(或者数组名来表示这个数组的首地址,用来表示这个数组的开头比较的元素的地址,不一定要是首地址,只是用于比较的“首”地址),2.一个数组元素的地址(对应的...

2018-10-23 20:17:02 313

原创 C++ 堆排

堆排的一开始要先建堆,这里是按从小到大排序,建立的是最大堆。注意这里的堆排要求数组的下标是从一开始,方便操作。堆排序的两个步骤:(1)从非叶子结点开始依次“下沉”,构建出最大堆。(2)依次将堆顶元素删除,此时新交换的根结点要”下沉".#include <iostream>using namespace std;void shift(int arr[],in...

2018-10-23 19:21:53 371

原创 二分查找:当有多个元素值与目标元素相等时,返回最左边和最右边一个元素的下标

参考链接: http://blog.chinaunix.net/uid-27103408-id-3761907.html函数使用二分查找搜索一个增序的数组,当有多个元素值与目标元素相等时,返回最左边一个元素的下标,目标元素不存在时返回-1。代码如下:#include &lt;iostream&gt;using namespace std;int BinarySearch(int...

2018-10-23 10:57:50 3600 2

原创 PAT甲级 1080 Graduate Admission (30 分)排序

1080 Graduate Admission (30 分)It is said that in 2011, there are about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if you could write a p...

2018-10-22 22:31:05 172

原创 PAT甲级 1077 Kuchiguse (20 分)字符串处理

1077 Kuchiguse (20 分)The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker's personality. Such ...

2018-10-21 21:39:35 318

原创 PAT甲级 1078 Hashing (25 分)(二次方探查法)

1078 Hashing (25 分)The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input numbers. The hash function is defined ...

2018-10-21 21:01:52 399 1

原创 1084 Broken Keyboard (20 分)has散列

1084 Broken Keyboard (20 分)On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on screen.Now given a st...

2018-10-21 16:15:50 259

原创 PAT甲级 1083 List Grades (25 分)排序水题

1083 List Grades (25 分)Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student rec...

2018-10-21 12:20:23 218

原创 1082 Read Number in Chinese (25 分)字符串处理

1082 Read Number in Chinese (25 分)Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output Fu first if it is negative. For example, -123456789 ...

2018-10-21 12:11:18 996

原创 PAT 1081 Rational Sum (20 分)分数的四则运算

1081 Rational Sum (20 分)Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum.Input Specification:Each input file contains one test case. Each case ...

2018-10-18 10:33:42 402

原创 实习所面到的算法题

今日头条iOS上海:1.二叉树的先中后序遍历,用非递归的形式。2.用两个栈实现一个队列功能。百度测开上海:1.输出链表的倒数第K个结点。

2018-10-17 18:12:54 122

原创 PAT甲级 1079 Total Sales of Supply Chain (25 分)DFS

参考链接:https://www.cnblogs.com/grglym/p/7922417.html1079 Total Sales of Supply Chain (25 分)A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in...

2018-10-16 21:54:46 218

原创 PAT甲级 1076 Forwards on Weibo (30 分)BFS 图的遍历

1076 Forwards on Weibo (30 分)Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed wi...

2018-10-08 22:04:44 205

原创 判断一棵树是否为另一棵树的子树

参考链接:判断一棵树是否为另一棵树的子树思路:1、原二叉树走前序遍历,试图发现哪个节点的值和被判断子树的根节点相同;如果一直到最后也没有找到那么肯定不是2、如果找到了,就两个二叉树一起前序遍历,试图发现两个二叉树同时遍历完成,且同样的左右子树遍历过程中的节点值均相同,同时遍历完成说明有相同的形状,左右子树遍历过程中的节点值均相同说明两个二叉树不仅形状一样,值也是一样,则可以认为是子...

2018-10-08 21:20:52 1383 1

原创 C++ 反转链表

参考链接:链表翻转的图文讲解(递归与迭代两种实现)这里主要写了非递归的实现反转的函数实现:LNode *reverList(LNode *&amp;head){ if(head == nullptr || head-&gt;next == nullptr) return head; LNode *pre = nullptr,*cur = head;//注意pre的初始值是...

2018-10-06 19:09:44 373

转载 PAT甲级真题目录(按题型整理)

原文链接: PAT甲级真题目录(按题型整理)最短路径1003. Emergency (25)-PAT甲级真题(Dijkstra算法) 1018. Public Bike Management (30)-PAT甲级真题(Dijkstra + DFS) 1030. Travel Plan (30)-PAT甲级真题(Dijkstra + DFS,输出路径,边权) 1087. All Roa...

2018-10-06 18:57:28 16844 3

原创 PAT甲级 1074 Reversing Linked List (25 分)数组链表

1074 Reversing Linked List (25 分)Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given Lbeing 1→2→3→4→5→6, if K=3, then yo...

2018-10-06 18:54:08 142

原创 PAT甲级 1073 Scientific Notation (20 分)String的使用

1073 Scientific Notation (20 分)Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9].[0-9]+E[+-...

2018-10-06 18:46:30 111

原创 PAT甲级 1072 Gas Station (30 分)Dijkstra

1072 Gas Station (30 分)A gas station has to be built at such a location that the minimum distance between the station and any of the residential housing is as far away as possible. However it must g...

2018-10-05 21:21:30 387

原创 PAT甲级 1071 Speech Patterns (25 分)map映射,STL的使用

1071 Speech Patterns (25 分)People often have a preference among synonyms of the same word. For example, some may prefer "the police", while others may prefer "the cops". Analyzing such patterns can ...

2018-10-05 19:54:52 268

原创 PAT甲级 1070 Mooncake (25 分)贪心算法

1070 Mooncake (25 分)Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional mooncakes according to the ...

2018-10-05 19:45:09 231

原创 PAT甲级 1069 The Black Hole of Numbers (20 分)STL的使用

1069 The Black Hole of Numbers (20 分)For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decreasing order...

2018-10-05 19:35:18 217

背包九讲-2.0

动态规划之经典背包问题,让你更清楚如何求解DP问题!

2018-09-16

吴恩达2014机器学习作业(全部完整!!!作业全部代码已补全且运行结果无误!!!)

这些作业本人亲自都做完过一遍,里面的作业代码我已经补充完整,而且代码简洁清晰,全部可以直接运行出最终结果。方便你参考完成作业!!作业内容数据文档全都完整,而且没有任何问题!!!

2018-06-20

吴恩达机器学习作业(完整版!!亲自做过!)

吴恩达2014机器学习课程对应全部作业,内有详细代码以及题目说明文档!!代码清晰,亲自做过无任何问题!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

2018-05-29

Python网络数据采集

作者:Ryan Mitchell 书采用简洁强大的Python语言,介绍了网络数据采集,并为采集新式网络中的各种数据类型提供了全面的指导。第一部分重点介绍网络数据采集的基本原理:如何用Python从网络服务器请求信息,如何对服务器的响应进行基本处理,以及如何以自动化手段与网站进行交互。第二部分介绍如何用网络爬虫测试网站,自动化处理,以及如何通过更多的方式接入网络。

2018-04-27

机器学习实战源代码

Peter机器学习实战书籍对应的源代码!!!Peter机器学习实战书籍对应的源代码!!!Peter机器学习实战书籍对应的源代码!!!Peter机器学习实战书籍对应的源代码!!!Peter机器学习实战书籍对应的源代码!!!

2018-04-27

机器学习实战

机器学习是人工智能研究领域中的一个极其重要的方向。在现今大数据时代的背景下捕获数据并从中萃取有价值的信息或模式使得这一过去为分析师与数学家所专属的研究领域越来越为人们瞩目。本书通过精心排的实例切入日常工作任务摒弃学术化语言利用高效可复用的Python 代码阐释如何处理统计数据进行数据分析及可视化。读者可从中学到一些核心的机器学习算法并将其运用于某些策略性任务中如分类、预测及推荐等。本书适合机器学习相关研究人员及互联网从业人员学习参考。

2018-04-27

Effective C++中文版

Effective C++是世界顶级C++大师Scott Meyers的成名之作,初版于1991年。在国际上,这本书所引起的反响之大,波及整个计算机技术出版领域,余音至今未绝。几乎在所有C++书籍的推荐名单上,这部专著都会位于前三名。作者高超的技术把握力,独特的视角、诙谐轻松的写作风格、独具匠心的内容组织,都受到极大的推崇和仿效。 书中的50条准则,每一条都扼要说明了一个可让你写出更好的C++ 程序代码的方法,并以特别设计过的例子详加讨论。在此第二版中,Meyers重新检验了每一准则,特别注意兼容于C++标准规格与现行编译器技术,并融入软件界对C++运用的最新观察结果。

2018-04-27

OpenCV3-毛星云编程入门

《OpenCV3编程入门》要求读者具有基础的C/C++知识,适合研究计算机视觉以及相关领域的在校学生和老师、初次接触OpenCV但有一定C/C++编程基础的研究人员,以及已有过OpenCV 1.0编程经验,想快速了解并上手OpenCV2、OpenCV3编程的计算机视觉领域的专业人员。《OpenCV3编程入门》也适合于图像处理、计算机视觉领域的业余爱好者、开源项目爱好者做为通向新版OpenCV的参考手册之用。

2018-04-27

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除