![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
滑动窗口
马角的逆袭
很菜的菜鸡
展开
-
哈尔滨理工大学软件与微电子学院程序设计竞赛 Defeat the monster 排序+滑动窗口
链接:https://ac.nowcoder.com/acm/contest/5929/L来源:牛客网题目描述多多最近迷上了网游,游戏中有一只大Boss非常厉害,多多想要组个团打败他。游戏中有个奇怪的设定,就是打怪的团队人数越多,越容易战胜Boss。但是如果队伍中的选手能力值差距超过 5 的话,那么Boss将会得到强化。现在多多作为队长,想要在可选的玩家中挑选尽可能多的队员,但是他又不想让Boss得到强化。多多难住了,不知道怎么办了,你能帮帮他吗?输入描述:第一行输入一个整数 N (1 ≤原创 2020-06-14 19:36:12 · 273 阅读 · 0 评论 -
NC51001 Sliding Window 滑动窗口最大最小值问题 堆优化
链接:https://ac.nowcoder.com/acm/problem/51001来源:牛客网题目描述An array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each tim原创 2020-05-21 11:16:38 · 672 阅读 · 0 评论 -
Educational Codeforces Round 87 (Rated for Div. 2) B. Ternary String滑动窗口板子题
B. Ternary Stringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a string s such that each its character is either 1, 2, or 3. You have to choose the shortest contiguous substring of原创 2020-05-17 18:22:43 · 244 阅读 · 0 评论