自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

小码农过河

每一个努力写代码的人,都有一个想要实现的梦。

  • 博客(41)
  • 资源 (4)
  • 收藏
  • 关注

原创 caffe制作lmdb数据集(Windows)

convert_imageset [FLAGS] ROOTFOLDER/ LISTFILE DB_NAME1.convert_imageset 可以到 ‘D:\caffe-master\Build\x64\Release’文件夹下面找;2.[FLAGS]是可选项,如果list文件里面有写就不用了3.ROOTFOLDER/是图片所在文件夹加上‘\’4.LISTFILE是文件列表...

2019-11-28 16:59:48 198

原创 LeetCode 19. 删除链表的倒数第N个节点(C++)

给定一个链表,删除链表的倒数第 n 个节点,并且返回链表的头结点。示例:给定一个链表: 1->2->3->4->5, 和 n = 2.当删除了倒数第二个节点后,链表变为 1->2->3->5.说明:给定的 n 保证是有效的。进阶:你能尝试使用一趟扫描实现吗?思路:双指针,控制两个指针距离为n,同时后移,然后删除第一个指针...

2018-12-24 23:26:18 366

原创 LeetCode 18. 四数之和(C++)

给定一个包含 n 个整数的数组 nums 和一个目标值 target,判断 nums 中是否存在四个元素 a,b,c 和 d ,使得 a + b + c + d 的值与 target 相等?找出所有满足条件且不重复的四元组。注意:答案中不可以包含重复的四元组。示例:给定数组 nums = [1, 0, -1, 0, -2, 2],和 target = 0。满足要求的四元组集合...

2018-12-24 22:35:43 401

原创 LeetCode 17. 电话号码的字母组合(C++)

 给定一个仅包含数字 2-9 的字符串,返回所有它能表示的字母组合。给出数字到字母的映射如下(与电话按键相同)。注意 1 不对应任何字母。示例:输入:"23"输出:["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"].说明:

2018-12-24 21:57:23 1359

原创 LeetCode 16. 最接近的三数之和(C++)

给定一个包括 n 个整数的数组 nums 和 一个目标值 target。找出 nums 中的三个整数,使得它们的和与 target 最接近。返回这三个数的和。假定每组输入只存在唯一答案。例如,给定数组 nums = [-1,2,1,-4], 和 target = 1.与 target 最接近的三个数的和为 2. (-1 + 2 + 1 = 2).思路:和15题类似思路,如果i,j,...

2018-12-24 16:55:16 380

原创 LeetCode 15. 三数之和(C++)

给定一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?找出所有满足条件且不重复的三元组。注意:答案中不可以包含重复的三元组。例如, 给定数组 nums = [-1, 0, 1, 2, -1, -4],满足要求的三元组集合为:[ [-1, 0, 1], [-1, -1, 2]]思路:双指针我...

2018-12-24 16:24:09 134

原创 LeetCode 513. 找树左下角的值(C++)

给定一个二叉树,在树的最后一行找到最左边的值。示例 1:输入: 2 / \ 1 3输出:1 示例 2:输入: 1 / \ 2 3 / / \ 4 5 6 / 7输出:7 注意: 您可以假设树(即给定的根节点)不为 NULL。...

2018-11-22 01:42:00 226

原创 LeetCode 559. N叉树的最大深度(C++)

最大深度是指从根节点到最远叶子节点的最长路径上的节点总数。例如,给定一个 3叉树 :  我们应返回其最大深度,3。说明:树的深度不会超过 1000。 树的节点总不会超过 5000。基本思路:层序遍历,不要用递归,会超时。我的解答(执行用时: 52 ms, 在Maximum Depth of N-ary Tree的C++提交中击败了72.48%的用户):/*...

2018-11-22 01:10:50 256

原创 LeetCode 728.自除数(C++)

自除数 是指可以被它包含的每一位数除尽的数。例如,128 是一个自除数,因为 128 % 1 == 0,128 % 2 == 0,128 % 8 == 0。还有,自除数不允许包含 0 。给定上边界和下边界数字,输出一个列表,列表的元素是边界(含边界)内所有的自除数。示例 1:输入: 上边界left = 1, 下边界right = 22输出: [1, 2, 3, 4, 5,...

2018-11-20 12:31:48 413

原创 LeetCode 118杨辉三角(C++)

在杨辉三角中,每个数是它左上方和右上方的数的和。示例:输入: 5输出:[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]]思路:两层循环,依次计算每个元素,时间复杂度O(n^2)我的解答:class Solution {public: vector<vector<int>...

2018-11-19 15:33:32 357

原创 LeetCode 48.旋转图像(C++)

给定一个 n × n 的二维矩阵表示一个图像。将图像顺时针旋转 90 度。说明:你必须在原地旋转图像,这意味着你需要直接修改输入的二维矩阵。请不要使用另一个矩阵来旋转图像。示例 1:给定 matrix = [ [1,2,3], [4,5,6], [7,8,9]],原地旋转输入矩阵,使其变为:[ [7,4,1], [8,5,2], [9,6,3...

2018-11-18 17:32:09 604

原创 leetCode 39.组合总和(C++)

给定一个无重复元素的数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。candidates 中的数字可以无限制重复被选取。说明:所有数字(包括 target)都是正整数。 解集不能包含重复的组合。 示例 1:输入: candidates = [2,3,6,7], target = 7,所求解集为...

2018-11-18 15:31:46 333

原创 LeetCode 561.数组拆分 Ⅰ(C++)

给定长度为 2n 的数组, 你的任务是将这些数分成 n 对, 例如 (a1, b1), (a2, b2), ..., (an, bn) ,使得从1 到 n 的 min(ai, bi) 总和最大。示例 1:输入: [1,4,3,2]输出: 4解释: n 等于 2, 最大总和为 4 = min(1, 2) + min(3, 4).提示:n 是正整数,范围在 [1, 10000...

2018-11-18 14:19:37 172

原创 LeetCode 216.组合总和 Ⅲ(C++)

找出所有相加之和为 n 的 k 个数的组合。组合中只允许含有 1 - 9 的正整数,并且每种组合中不存在重复的数字。说明:所有数字都是正整数。 解集不能包含重复的组合。 示例 1:输入: k = 3, n = 7输出: [[1,2,4]]示例 2:输入: k = 3, n = 9输出: [[1,2,6], [1,3,5], [2,3,4]]执行用时为0ms的...

2018-11-18 13:58:31 235

原创 LeetCode 867.转置矩阵

给定一个矩阵 A, 返回 A 的转置矩阵。矩阵的转置是指将矩阵的主对角线翻转,交换矩阵的行索引与列索引。 示例 1:输入:[[1,2,3],[4,5,6],[7,8,9]]输出:[[1,4,7],[2,5,8],[3,6,9]]示例 2:输入:[[1,2,3],[4,5,6]]输出:[[1,4],[2,5],[3,6]] 提示:1 <= A.l...

2018-11-17 21:13:48 142

原创 LeetCode 78.子集

给定一组不含重复元素的整数数组 nums,返回该数组所有可能的子集(幂集)。说明:解集不能包含重复的子集。示例:输入: nums = [1,2,3]输出:[ [3],  [1],  [2],  [1,2,3],  [1,3],  [2,3],  [1,2],  []]执行用时为 4 ms 的范例:class Solution {public: ...

2018-11-17 19:59:24 126

原创 LeetCode 52.螺旋矩阵 Ⅱ

给定一个正整数 n,生成一个包含 1 到 n2 所有元素,且元素按顺时针顺序螺旋排列的正方形矩阵。示例:输入: 3输出:[ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7, 6, 5 ]]执行用时为0ms的范例:class Solution {public: vector<vector<int>> generateMat...

2018-11-17 15:05:01 99

原创 leetcode 70. 爬楼梯

深夜纪念一下第一次超过100%!顺便说下这个题的测试用例应该就是1-45咯

2018-10-08 00:58:13 117

原创 PAT:A1060. Are They Equal (17/25)

If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0.123*105 with simple chopping. Now given the number of significa...

2018-03-22 15:24:55 121

原创 PAT:A1063. Set Similarity (25/25)

Given two sets of integers, the similarity of the sets is defined to be Nc/Nt*100%, where Nc is the number of distinct common numbers shared by the two sets, and Nt is the total number of distinct num...

2018-03-21 21:53:39 135

原创 PAT:A1047. Student List for Course (25/25)

Zhejiang University has 40000 students and provides 2500 courses. Now given the registered course list of each student, you are supposed to output the student name lists of all the courses.Input Speci...

2018-03-17 13:21:23 95

原创 PAT:A1039. Course List for Student (25/25)

Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered course list for each student who comes ...

2018-03-16 22:55:43 125

原创 PAT:B1033. 旧键盘打字(16/20)

旧键盘上坏了几个键,于是在敲一段文字的时候,对应的字符就不会出现。现在给出应该输入的一段文字、以及坏掉的那些键,打出的结果文字会是怎样?输入格式:输入在2行中分别给出坏掉的那些键、以及应该输入的文字。其中对应英文字母的坏键以大写给出;每段文字是不超过105个字符的串。可用的字符包括字母[a-z, A-Z]、数字0-9、以及下划线“_”(代表空格)、“,”、“.”、“-”、“+”(代

2017-12-02 14:45:53 203

原创 627. Swap Salary

Given a table salary, such as the one below, that has m=male and f=female values. Swap all f and m values (i.e., change all f values to m and vice versa) with a single update query and no intermediate

2017-07-04 16:22:58 986

原创 521. Longest Uncommon Subsequence I

Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings.The longest uncommon subsequence is defined as the longest subsequence of one of these stri

2017-07-04 16:02:50 203

原创 PAT:B1023. 组个最小数 (20/20)

给定数字0-9各若干个。你可以以任意顺序排列这些数字,但必须全部使用。目标是使得最后得到的数尽可能小(注意0不能做首位)。例如:给定两个0,两个1,三个5,一个8,我们得到的最小的数就是10015558。现给定数字,请编写程序输出能够组成的最小的数。输入格式:每个输入包含1个测试用例。每个测试用例在一行中给出10个非负整数,顺序表示我们拥有数字0、数字1、……数字9的个数。

2017-06-09 23:24:07 206

原创 PAT:B1020. 月饼 (25/25)

月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼。现给定所有种类月饼的库存量、总售价、以及市场的最大需求量,请你计算可以获得的最大收益是多少。注意:销售时允许取出一部分库存。样例给出的情形是这样的:假如我们有3种月饼,其库存量分别为18、15、10万吨,总售价分别为75、72、45亿元。如果市场的最大需求量只有20万吨,那么我们最大收益策略应该是卖出全部15万吨第2种

2017-06-09 23:03:06 186

原创 Coursera Ng机器学习编程作业1:Linear Regression

程序员的一生时间90%是用在编程上,而剩余的10%是活在世界上。1.简单的octave/MATLAB函数A = eye(5);2.单变量线性回归问题:根据所给数据(城市人口和盈利的关系),选择在哪里开下一个分店1)绘制数据从文件中加载数据: %% ======================= Part 2: Plotting ===========

2017-04-26 22:54:55 667

原创 PAT:A1095. Cars on Campus (0/30)

-----当你还不能写出自己满意的程序时,你就不要去睡觉。Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the gate. Now with a

2017-02-14 23:38:14 284

原创 PAT:A1012. The Best Rank (0/25)

To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algebra), and E - Eng

2017-02-10 23:00:38 179

原创 PAT:A1015. 德才论 (0/25)

宋代史学家司马光在《资治通鉴》中有一段著名的“德才论”:“是故才德全尽谓之圣人,才德兼亡谓之愚人,德胜才谓之君子,才胜德谓之小人。凡取人之术,苟不得圣人,君子而与之,与其得小人,不若得愚人。”现给出一批考生的德才分数,请根据司马光的理论给出录取排名。输入格式:输入第1行给出3个正整数,分别为:N(5),即考生总数;L(>=60),为录取最低分数线,即德分和才分均不低于L的考

2017-02-10 17:51:50 357

原创 PAT:A1025. PAT Ranking (0/25)

Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several places, and the ranklists w

2017-02-10 15:59:23 194

原创 PAT:A1082. Read Number in Chinese (0/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 is read as "Fu yi Yi er Qian san B

2017-02-10 01:53:59 224

原创 PAT:A1077. Kuchiguse (0/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 a preference is called

2017-02-09 21:42:40 204

原创 PAT:A1035. Password (20/20)

To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish 1 (one) from l (L

2017-02-09 20:42:36 306

原创 PAT:A1005. Spell It Right (20/20)

Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each input file contains one test case. Each ca

2017-02-08 21:52:39 176

原创 PAT:A1001. A+B Format (20/20)

Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).InputEach input file cont

2017-02-08 20:50:01 242

原创 PAT:B1048. 数字加密(16/20)

#include #include int main(){    char a[110];    char b[110];    scanf("%s %s",a,b);    int len1=strlen(a);    int len2=strlen(b);    printf("%s %s\n",a,b);    printf("%c %d %d

2017-02-08 12:02:01 168

原创 PAT:B1021. 个位数统计 (15)

马克一下这个有纪念意义的题,因为它某种程度上说明了我的蠢。给定一个k位整数N = dk-1*10k-1 + ... + d1*101 + d0 (0i<=9, i=0,...,k-1, dk-1>0),请编写程序统计每种不同的个位数字出现的次数。例如:给定N = 100311,则有2个0,3个1,和1个3。输入格式:每个输入包含1个测试用例,即一个不超过10

2017-02-05 22:30:02 168

原创 PAT:B1002. 写出这个数 (20)

读入一个自然数n,计算其各位数字之和,用汉语拼音写出和的每一位数字。输入格式:每个测试输入包含1个测试用例,即给出自然数n的值。这里保证n小于10100。输出格式:在一行内输出n的各位数字之和的每一位,拼音数字间有1 空格,但一行中最后一个拼音数字后没有空格。输入样例:1234567890987654321123456789输出样例:yi san wu

2016-07-16 10:16:00 240

Artificial Intelligence A Modern Approach 3e Solutions第三版答案

Artificial Intelligence A Modern Approach 3e Solutions第三版答案

2017-10-31

《数据库系统概论》王珊 萨师煊(第四版)课后答案.doc

《数据库系统概论》王珊 萨师煊(第四版)课后答案.doc

2015-07-04

数据库系统概论(王珊_萨师煊)

数据库系统概论(王珊_萨师煊)第四版教材 东北大学用

2015-07-04

东北大学汇编实验

12级全部源代码,可运行,保证是学弟学妹的福利哦

2015-01-05

空空如也

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

TA关注的人

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