自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 Masha与老鼠

题目链接:链接: NK—14847.题目描述:链接:https://ac.nowcoder.com/acm/problem/14847来源:牛客网有一天Masha回到家,发现有n只老鼠在它公寓的走廊上,她大声呼叫,所以老鼠们都跑进了走廊的洞中。这个走廊可以用一个数轴来表示,上面有n只老鼠和m个老鼠洞。第i只老鼠有一个坐标????????,第????个洞有一个坐标????????和容量????????。容量表示最多能容纳的老鼠数量。找到让老鼠们全部都进洞的方式,使得所有老鼠运动距离总和最小。老鼠i

2021-02-03 23:24:18 648

原创 最优屏障

题目描述:M国的地势高低不平,现给出一个数组代表此国家某纬度上均匀分布的N座山的海拔高度Hi,已知每座山的山顶上都有一座哨塔,若两个哨兵分别位于第i、j(i<j)座山上,当且仅当两人所在的山比两人之间所有的山都高时,这两个哨兵可以相互监视,M国的防守能力大小为相互监视的哨兵对数。H国早已对M国虎视眈眈,H国的皇帝希望黑魔法师们可以在M国的某两座山之间放置一块巨大的屏障,M国的哨兵不可通过该屏障互相监视。皇帝想让你告诉他最优的屏障放置位置,你是皇帝手下最信任的军师,现在需要你帮助皇帝计算最优的屏障放置

2021-01-26 23:19:30 152

原创 Largest Rectangle in a Histogram

题目链接:链接: NK—50965.题目描述:A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figure on the left shows the histogram that consists of

2021-01-26 22:36:31 146

原创 Program

题目链接:链接: codeforces—1473D.题目描述:You are given a program that consists of n instructions. Initially a single variable x is assigned to 0. Afterwards, the instructions are of two types:increase x by 1;decrease x by 1.You are given m queries of the follow

2021-01-26 20:50:24 152

原创 Array Destruction

题目链接:链接: codeforces—1474C.题目描述:You found a useless array a of 2n positive integers. You have realized that you actually don’t need this array, so you decided to throw out all elements of a.It could have been an easy task, but it turned out that you shou

2021-01-26 16:02:04 98

原创 Dessert Café

题目链接: Gym - 102920C .题目描述:Kim, who wishes to start a business, is trying to open a dessert cafe he has been preparing after graduating from college. The road network in the town where Kim lives forms a tree structure, that is, a connected acyclic graph a

2021-01-25 17:13:18 632

空空如也

空空如也

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

TA关注的人

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