随笔分类 -  刷题笔记

摘要:第一题 :最大子矩阵 给定一个二维整数矩阵,选其中一个子矩阵,使得这个子矩阵内的所有数字和是最大的。 输入第一行n m ∈[1,10] 表示矩阵大小;下面多行表示输入矩阵,元素大小在[-1000,1000];输出输出一个整数,代表最大和 import java.io.IOException; imp 阅读全文
posted @ 2021-08-27 23:07 凸云 阅读(225) 评论(0) 推荐(0)
摘要:1003 Emergency (25 分) As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered citie 阅读全文
posted @ 2021-08-25 18:16 凸云 阅读(557) 评论(0) 推荐(0)
摘要:给定一段一段的绳子,你需要把它们串成一条绳。每次串连的时候,是把两段绳子对折,再如下图所示套接在一起。这样得到的绳子又被当成是另一段绳子,可以再次对折去跟另一段绳子串连。每次串连后,原来两段绳子的长度就会减半。 给定 N 段绳子的长度,你需要找出它们能串成的绳子的最大长度。 输入格式: 每个输入包含 阅读全文
posted @ 2021-08-24 17:19 凸云 阅读(42) 评论(0) 推荐(0)
摘要:With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas s 阅读全文
posted @ 2021-08-23 22:34 凸云 阅读(59) 评论(0) 推荐(0)
摘要:1023 组个最小数 (20 分) 给定数字 0-9 各若干个。你可以以任意顺序排列这些数字,但必须全部使用。目标是使得最后得到的数尽可能小(注意 0 不能做首位)。例如:给定两个 0,两个 1,三个 5,一个 8,我们得到的最小的数就是 10015558。 现给定数字,请编写程序输出能够组成的最小 阅读全文
posted @ 2021-08-23 16:29 凸云 阅读(43) 评论(0) 推荐(0)
摘要:1020 月饼 (25 分) 月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼。现给定所有种类月饼的库存量、总售价、以及市场的最大需求量,请你计算可以获得的最大收益是多少。 注意:销售时允许取出一部分库存。样例给出的情形是这样的:假如我们有 3 种月饼,其库存量分别为 18、1 阅读全文
posted @ 2021-08-22 19:18 凸云 阅读(55) 评论(0) 推荐(0)
摘要:1045 Favorite Color Stripe (30 分) Eva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors in he 阅读全文
posted @ 2021-08-22 12:33 凸云 阅读(48) 评论(0) 推荐(0)
摘要:1040 Longest Symmetric String (25 分) Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given Is 阅读全文
posted @ 2021-08-22 12:31 凸云 阅读(51) 评论(0) 推荐(0)
摘要:1007 Maximum Subsequence Sum (25 分) Given a sequence of K integers { N1​, N2​, ..., NK​ }. A continuous subsequence is defined to be { Ni​, Ni+1​, ... 阅读全文
posted @ 2021-08-22 12:27 凸云 阅读(26) 评论(0) 推荐(0)
摘要:1068 Find More Coins (30 分) Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a unive 阅读全文
posted @ 2021-08-22 12:22 凸云 阅读(81) 评论(0) 推荐(0)

谢谢打赏!