Sun浅雨
Sun浅雨
全部文章
c/c++
2019蓝桥训练(1)
Docker学习(2)
java基础学习(13)
Linux 学习(4)
spring(4)
springboot(3)
并发编程学习(2)
数据结构与算法(3)
归档
标签
去牛客网
登录
/
注册
Sun浅雨的博客
非学,无以致疑;非问,无以广识
全部文章
/ c/c++
(共13篇)
编程之面试题测试(一)
问题1 : 图的遍历 描述 给定n个城市,n-1条道路的无向连通图。城市从1到n编号,LeeLdler想跑完所有的城市。也就是说LeeLdler打算从1号节点出发,走遍所有的城市,因为如果城市之间的距离太长,LeeLdler得跑死。所有令每条路的长度为1。但LeeLdler还是觉得自己会跑死,因...
2019-09-24
0
670
E. Boxers
Problem There are nn boxers, the weight of the ii-th boxer is aiai. Each of them can change the weight by no more than 11 before the competition (the...
2019-09-07
0
606
C. Common Divisors
Problem You are given an array aa consisting of nn integers. Your task is to say the number of such positive integers xx such that xx divides each n...
2019-09-07
0
899
C. Book Reading
problem Polycarp is reading a book consisting of nn pages numbered from 11 to nn. Every time he finishes the page with the number divisible by mm, he...
2019-09-06
0
583
PAT贪心算法练习—月饼
题目描述 月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼。现给定所有种类月饼的库存量、总售价、以及市场的最大需求量,请你计算可以获得的最大收益是多少。 注意:销售时允许取出一部分库存。样例给出的情形是这样的:假如我们有3种月饼,其库存量分别为18、15、10万吨,总售价分...
贪心
sort
2019-08-26
0
738
PAT德才论详解
题目描述 宋代史学家司马光在《资治通鉴》中有一段著名的“德才论”:“是故才德全尽谓之圣人,才德兼亡谓之愚人,德胜才谓之君子,才胜德谓之 小人。凡取人之术,苟不得圣人,君子而与之,与其得小人,不若得愚人。” 现给出一批考生的德才分数,请根据司马光的理论给出录取排名。 输入描述: ...
2019-08-24
0
637
动态规划——编辑距离
给定两个单词 word1 和 word2,计算出将 word1 转换成 word2 所使用的最少操作数 。 你可以对一个单词进行如下三种操作: 插入一个字符 删除一个字符 替换一个字符 示例 1: 输入: word1 = “horse”, word2 = “ros” 输...
2019-08-16
0
465
零钱兑换问题
给定不同面额的硬币 coins 和一个总金额 amount。编写一个函数来计算可以凑成总金额所需的最少的硬币个数。如果没有任何一种硬币组合能组成总金额,返回 -1。 示例 1: 输入: coins = [1, 2, 5], amount = 11 输出: 3 解释: 11 = 5 + 5 +...
2019-08-14
0
643
Factors of Factorial(思维公式)
Problem Statement You are given an integer N. Find the number of the positive divisors of N!, modulo 109+7. Constraints 1≤N≤103 Input The...
2019-01-25
0
601
Boxes and Candies(水题)
Problem Statement There are N boxes arranged in a row. Initially, the i-th box from the left contains ai candies. Snuke can perform the following op...
2019-01-25
0
558
首页
上一页
1
2
下一页
末页