![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
刷题
芸编蕴香
知识蕴含香味///脱贫致富
展开
-
HIT ACM 1005高速公路快餐店仓库选址(动态规划)
Problem Description在一条高速公路上有 n 个快餐店(0<n<=200),现在要在这 n 个快餐店位置里面选区 k 个位置作为仓库的位置(0<k<=30) 。每个快餐店由最近的仓库供应。第一行 输入 n 和k , k< n;下面n行输入n个整数(d1 < d2 < … < dn)。总的运输代价sum等于下表的计算值。要求sum最小...原创 2019-05-06 20:09:44 · 1579 阅读 · 0 评论 -
HIT ACM 1007题 单点故障SPF(图论,关节点与重连通分量)
InputThe input will contain the description of several networks. A network description will consist of pairs of integers, one pair per line, that identify connected nodes. Ordering of the pairs is i...原创 2019-06-01 15:28:49 · 380 阅读 · 0 评论 -
HIT ACM1008 How many N
问题描述Find a minimal interger K which is merely comprised of N and can be divided by M.For example,11 is the minimal number that and be divided by 11, and it is comprised of two '1’s, and 111111 can ...原创 2019-06-25 22:47:32 · 199 阅读 · 0 评论 -
HITACM1006 - Weird Clock
问题描述A weird clock marked from 0 to 59 has only a minute hand. It won’t move until a special coin is thrown into its box. There are different kinds of coins as your options. However once you make yo...原创 2019-06-25 23:49:15 · 235 阅读 · 0 评论 -
利用HASH运算寻求求解两数之和问题
题目给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。你可以假设每种输入只会对应一个答案。但是,你不能重复利用这个数组中同样的元素。示例:给定 nums = [2, 7, 11, 15], target = 9来源:力扣(LeetCode)分析查找相关的问题,暴力解法是对每一个数字遍历数组,时间复杂度O(n2...原创 2019-06-25 00:04:47 · 414 阅读 · 0 评论