![](https://img-blog.csdnimg.cn/20190918140012416.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
简单数据结构
lonely_wind_
路漫漫兮
展开
-
Codeforces 950C-Zebras(模拟构造)
题目链接:https://codeforces.com/problemset/problem/950/C 博客园食用链接:https://www.cnblogs.com/lonely-wind-/p/13453216.html Oleg writes down the history of the days he lived. For each day he decides if it was good or bad. Oleg calls a non-empty sequence of days a ze原创 2020-08-07 15:35:01 · 305 阅读 · 0 评论 -
CSUST 4003-你真的会泡面吗?(优先队列模拟)
题目链接:http://acm.csust.edu.cn/problem/4003 博客园食用链接: Description 高铁上有nnn个人第iii个人编号为iii他在sis_isi 时刻想去泡泡面,他泡面所需时间为tit_iti 假设他们从座位到饮水机的时间可以忽略不计。不过只有一台饮水机,所以他们要排队泡面。 特别的,泡面可以分很多次泡完。比如你泡面需要3min3min3min,可以先泡1min1min1min,那么接下来你所需泡面的时间为2min2min2min。 泡面机服务策略: 首先先来的原创 2020-08-04 21:15:34 · 316 阅读 · 0 评论 -
CSUST 2009-Longest Subarray(队列的应用)
题目链接:http://acm.csust.edu.cn/problem/2009 博客园食用链接: https://www.cnblogs.com/lonely-wind-/p/13397273.html Description You are given two integers CCC,KKK and an array of NNN integers a1,a2,⋯ ,aNa_1,a_2,\cdots,a_Na1,a2,⋯,aNIt is guaranteed that the value of原创 2020-07-29 15:09:46 · 274 阅读 · 0 评论 -
编辑器--acwing128(对顶栈)
你将要实现一个功能强大的整数序列编辑器。 在开始时,序列是空的。 编辑器共有五种指令,如下: 1、“I x”,在光标处插入数值x。 2、“D”,将光标前面的第一个元素删除,如果前面没有元素,则忽略此操作。 3、“L”,将光标向左移动,跳过一个元素,如果左边没有元素,则忽略此操作。 4、“R”,将光标向右移动,跳过一个元素,如果右边没有元素,则忽略次操作。 5、“Q k”,假设此刻光标之前的序...原创 2019-08-31 23:50:52 · 347 阅读 · 0 评论