![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
栈和队列
Stephencurry‘s csdn
这个作者很懒,什么都没留下…
展开
-
C - C.惊天浪涛杀 (CodeForces-1140C)(堆栈+贪心)
You have a playlist consisting ofnnsongs. Theii-th song is characterized by two numberstitiandbibi— its length and beauty respectively. The pleasure of listening to set of songs is equal to the...原创 2020-04-23 16:47:04 · 225 阅读 · 0 评论 -
Web Navigation (POJ-1028)(堆栈)
Standard web browsers contain features to move backward and forward among the pages recently visited. One way to implement these features is to use two stacks to keep track of the pages that can be re...原创 2020-04-20 21:00:29 · 244 阅读 · 0 评论 -
大鱼吃小鱼(栈)
大鱼吃小鱼(栈)我在最近的一次选拔赛上做到了这道题,当时我想到了用栈去做,也有了些思路,但是代码实现上却出了一些问题。。。。但现在感觉会了这道题。下面放上题目链接:传送门这里是题目:题目描述:有N条鱼,在一条直线上移动。速度相同,两条鱼相遇大鱼会吃掉小鱼。给出每条鱼的初始位置xi,大小ai,移动方向时间足够长,最后还剩多少鱼。所有鱼大小初始位置均不相同,位置5相...原创 2019-03-04 21:13:03 · 258 阅读 · 0 评论 -
栈
一、栈的特点后进先出二、普通栈#include <stdio.h>#include <algorithm#include <stackusing namespace std;int x;//定义一个xint main(){stack&amp原创 2018-11-29 19:13:25 · 90 阅读 · 0 评论 -
队列
#include <stdio.h>#include #include using namespace std;int a[10];//声明一个数组int main(){queueq;//定义一个qint n;while(~scanf("%d&a原创 2018-11-29 17:21:08 · 96 阅读 · 0 评论