PAT 甲级 1081 Rational Sum (20分)(多个分式相加,gcd忘了)*
摘要:1081 Rational Sum (20分) Given N rational numbers in the form numerator/denominator, you are supposed t...
阅读全文
posted @
2019-12-24 00:47
蔡军帅
阅读(145)
推荐(0) 编辑
PAT 甲级 1081 Rational Sum (20分)(多个分式相加,gcd忘了)*
摘要:1081 Rational Sum (20分) Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum. Input Specification: Each
阅读全文
posted @
2019-12-24 00:47
蔡军帅
阅读(329)
推荐(0) 编辑
初学nodejs express小案例——小小相册(不涉及数据库,非常详细)
摘要:业务简介: 显示文件夹 点击显示相册 上传相册 一、在主页显示文件夹 首先,我们要建立以上的文件夹,其中views用于放模板ejs,uploads里放的是相册文件夹,public是网页所需要的css,js等,node_modules放的是开发要用到的包,models是为数据库而建立的(本次用不到数据
阅读全文
posted @
2019-12-22 01:25
蔡军帅
阅读(643)
推荐(0) 编辑
初学nodejs express小案例——小小相册(不涉及数据库,非常详细)
摘要:业务简介:显示文件夹 点击显示相册上传相册 一、在主页显示文件夹 首先,我们要建立以上的文件夹,其中views用于放模板ejs,uploads里放的是相册文件夹,public是网页所需要的css,js等,...
阅读全文
posted @
2019-12-22 01:25
蔡军帅
阅读(249)
推荐(0) 编辑
Callback must be a function. Received undefined
摘要:fs.js:143 throw new ERR_INVALID_CALLBACK(cb); ^TypeError [ERR_INVALID_CALLBACK]: Callback must b...
阅读全文
posted @
2019-12-22 00:20
蔡军帅
阅读(447)
推荐(0) 编辑
Callback must be a function. Received undefined
摘要:fs.js:143 throw new ERR_INVALID_CALLBACK(cb); ^ TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined at makeCallback (fs.
阅读全文
posted @
2019-12-22 00:20
蔡军帅
阅读(4302)
推荐(0) 编辑
npm 安装包报错 rollbackFailedOptional
摘要:原因事设置的代理错误,删除即可 npm config rm proxynpm config rm https-proxy
阅读全文
posted @
2019-12-21 23:34
蔡军帅
阅读(3803)
推荐(0) 编辑
npm 安装包报错 rollbackFailedOptional
摘要:原因事设置的代理错误,删除即可npm config rm proxynpm config rm https-proxy
阅读全文
posted @
2019-12-21 23:34
蔡军帅
阅读(330)
推荐(0) 编辑
PAT 甲级 1074 Reversing Linked List (25 分)(链表部分逆置,结合使用双端队列和栈,其实使用vector更简单呐)...
摘要:1074 Reversing Linked List (25 分) Given a constant K and a singly linked list L, you are supposed to rever...
阅读全文
posted @
2019-12-16 22:35
蔡军帅
阅读(96)
推荐(0) 编辑
PAT 甲级 1071 Speech Patterns (25 分)(map)
摘要:1071 Speech Patterns (25 分) People often have a preference among synonyms of the same word. For example, s...
阅读全文
posted @
2019-12-16 22:33
蔡军帅
阅读(87)
推荐(0) 编辑
P3370 【模板】字符串哈希
摘要:题目描述如题,给定N个字符串(第i个字符串长度为Mi,字符串内包含数字、大小写字母,大小写敏感),请求出N个字符串中共有多少个不同的字符串。输入输出格式输入格式: 第一行包含一个整数N,为字符串的个数。接下来N行...
阅读全文
posted @
2019-12-16 22:32
蔡军帅
阅读(98)
推荐(0) 编辑
PageRank算法原理与Python实现
摘要:一、什么是pagerankPageRank的Page可是认为是网页,表示网页排名,也可以认为是Larry Page(google 产品经理),因为他是这个算法的发明者之一,还是google CEO(^_^)。Pa...
阅读全文
posted @
2019-12-08 21:35
蔡军帅
阅读(277)
推荐(0) 编辑
PageRank算法原理与Python实现
摘要:一、什么是pagerank PageRank的Page可是认为是网页,表示网页排名,也可以认为是Larry Page(google 产品经理),因为他是这个算法的发明者之一,还是google CEO(^_^)。PageRank算法计算每一个网页的PageRank值,然后根据这个值的大小对网页的重要性
阅读全文
posted @
2019-12-08 21:35
蔡军帅
阅读(6167)
推荐(0) 编辑
PAT-2019年冬季考试-甲级 7-4 Cartesian Tree (30分)(最小堆的中序遍历求层序遍历,递归建树bfs层序)
摘要:7-4 Cartesian Tree (30分) A Cartesian tree is a binary tree constructed from a sequence of distinct numbers. The tree is heap-ordered, and an inorder t
阅读全文
posted @
2019-12-08 13:07
蔡军帅
阅读(526)
推荐(0) 编辑
PAT-2019年冬季考试-甲级 7-4 Cartesian Tree (30分)(最小堆的中序遍历求层序遍历,递归建树bfs层序)...
摘要:7-4 Cartesian Tree (30分) A Cartesian tree is a binary tree constructed from a sequence of distinct numbers...
阅读全文
posted @
2019-12-08 13:07
蔡军帅
阅读(117)
推荐(0) 编辑
PAT-2019年冬季考试-甲级 7-3 Summit (25分) (邻接矩阵存储,直接暴力)
摘要:7-3 Summit (25分) A summit (峰会) is a meeting of heads of state or government. Arranging the rest areas for ...
阅读全文
posted @
2019-12-08 12:57
蔡军帅
阅读(85)
推荐(0) 编辑
PAT-2019年冬季考试-甲级 7-3 Summit (25分) (邻接矩阵存储,直接暴力)
摘要:7-3 Summit (25分) A summit (峰会) is a meeting of heads of state or government. Arranging the rest areas for the summit is not a simple job. The ideal ar
阅读全文
posted @
2019-12-08 12:57
蔡军帅
阅读(594)
推荐(0) 编辑
PAT-2019年冬季考试-甲级 7-2 Block Reversing (25分) (链表转置)
摘要:7-2 Block Reversing (25分) Given a singly linked list L. Let us consider every K nodes as a block (if there are less than K nodes at the end of the lis
阅读全文
posted @
2019-12-08 12:46
蔡军帅
阅读(366)
推荐(0) 编辑
PAT-2019年冬季考试-甲级 7-2 Block Reversing (25分) (链表转置)
摘要:7-2 Block Reversing (25分) Given a singly linked list L. Let us consider every K nodes as a block (if there...
阅读全文
posted @
2019-12-08 12:46
蔡军帅
阅读(113)
推荐(0) 编辑
PAT-2019年冬季考试-甲级 7-1 Good in C (20分)
摘要:7-1 Good in C (20分) When your interviewer asks you to write "Hello World" using C, can you do as the follo...
阅读全文
posted @
2019-12-08 12:34
蔡军帅
阅读(109)
推荐(0) 编辑
PAT-2019年冬季考试-甲级 7-1 Good in C (20分)
摘要:7-1 Good in C (20分) When your interviewer asks you to write "Hello World" using C, can you do as the following figure shows? Input Specification: Each
阅读全文
posted @
2019-12-08 12:34
蔡军帅
阅读(804)
推荐(1) 编辑
PAT 甲级 树专题小结
摘要:1.已知两个序链表建树 先序中序建树 PAT 1086 node *buildTree(vector<int>pre,vector<int>in,int pl,int pr,int il,int ir){ if(pl>pr || il>ir) return NULL; int pos=-1; for
阅读全文
posted @
2019-12-06 15:40
蔡军帅
阅读(263)
推荐(0) 编辑
PAT 甲级 树专题小结
摘要:1.已知两个序链表建树先序中序建树PAT 1086node *buildTree(vectorpre,vectorin,int pl,int pr,int il,int ir){ if(pl>pr || i...
阅读全文
posted @
2019-12-06 15:40
蔡军帅
阅读(88)
推荐(0) 编辑
PAT 甲级 1020 Tree Traversals (25分)(后序中序链表建树,求层序)***重点复习
摘要:1020 Tree Traversals (25分) Suppose that all the keys in a binary tree are distinct positive integers. Give...
阅读全文
posted @
2019-12-06 15:26
蔡军帅
阅读(87)
推荐(0) 编辑
PAT 甲级 1020 Tree Traversals (25分)(后序中序链表建树,求层序)***重点复习
摘要:1020 Tree Traversals (25分) Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequen
阅读全文
posted @
2019-12-06 15:26
蔡军帅
阅读(283)
推荐(0) 编辑
PAT 甲级 1086 Tree Traversals Again (25分)(先序中序链表建树,求后序)***重点复习
摘要:1086 Tree Traversals Again (25分) An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that wh
阅读全文
posted @
2019-12-06 14:26
蔡军帅
阅读(406)
推荐(0) 编辑
PAT 甲级 1086 Tree Traversals Again (25分)(先序中序链表建树,求后序)***重点复习...
摘要:1086 Tree Traversals Again (25分) An inorder binary tree traversal can be implemented in a non-recursive wa...
阅读全文
posted @
2019-12-06 14:26
蔡军帅
阅读(83)
推荐(0) 编辑
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 h...
阅读全文
posted @
2019-12-05 19:25
蔡军帅
阅读(110)
推荐(0) 编辑
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 us
阅读全文
posted @
2019-12-05 19:25
蔡军帅
阅读(327)
推荐(0) 编辑
PAT 甲级 1075 PAT Judge (25分)(较简单,注意细节)
摘要:1075 PAT Judge (25分) The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you are supposed to g
阅读全文
posted @
2019-12-05 18:29
蔡军帅
阅读(668)
推荐(0) 编辑
PAT 甲级 1075 PAT Judge (25分)(较简单,注意细节)
摘要:1075 PAT Judge (25分) The ranklist of PAT is generated from the status list, which shows the scores of ...
阅读全文
posted @
2019-12-05 18:29
蔡军帅
阅读(171)
推荐(0) 编辑
PAT 甲级 1080 Graduate Admission (30 分) (简单,结构体排序模拟)
摘要:1080 Graduate Admission (30 分) It is said that in 2011, there are about 100 graduate schools ready to ...
阅读全文
posted @
2019-12-04 15:20
蔡军帅
阅读(105)
推荐(0) 编辑
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 Pro
阅读全文
posted @
2019-12-04 15:20
蔡军帅
阅读(290)
推荐(0) 编辑
PAT 甲级 1079 Total Sales of Supply Chain (25 分)(简单,不建树,bfs即可)
摘要:1079 Total Sales of Supply Chain (25 分) A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in mo
阅读全文
posted @
2019-12-04 15:17
蔡军帅
阅读(386)
推荐(0) 编辑
PAT 甲级 1079 Total Sales of Supply Chain (25 分)(简单,不建树,bfs即可)
摘要:1079 Total Sales of Supply Chain (25 分) A supply chain is a network of retailers(零售商), distributors(经...
阅读全文
posted @
2019-12-04 15:17
蔡军帅
阅读(113)
推荐(0) 编辑
PAT 甲级 1078 Hashing (25 分)(简单,平方二次探测)
摘要:1078 Hashing (25 分) The task of this problem is simple: insert a sequence of distinct positive integer...
阅读全文
posted @
2019-12-04 15:11
蔡军帅
阅读(102)
推荐(0) 编辑
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
阅读全文
posted @
2019-12-04 15:11
蔡军帅
阅读(336)
推荐(0) 编辑
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
阅读全文
posted @
2019-12-04 15:08
蔡军帅
阅读(223)
推荐(0) 编辑
PAT 甲级 1077 Kuchiguse (20 分)(简单,找最大相同后缀)
摘要:1077 Kuchiguse (20 分) The Japanese language is notorious for its sentence ending particles. Personal p...
阅读全文
posted @
2019-12-04 15:08
蔡军帅
阅读(142)
推荐(0) 编辑