![](https://img-blog.csdnimg.cn/20190918140213434.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
栈
文章平均质量分 74
无
呵呵world
这个作者很懒,什么都没留下…
展开
-
【CCCC天梯赛L2-037】包装机 (队列&栈)
来源:CCCC天梯赛L2-037一种自动包装机的结构如图11所示。首先机器中有NN条轨道,放置了一些物品。轨道下面有一个筐。当某条轨道的按钮被按下时,活塞向左推动,将轨道尽头的一件物品推落筐中。当00号按钮被按下时,机械手将抓取筐顶部的一件物品,放到流水线上。图22显示了顺序按下按钮3、2、3、0、1、2、03、2、3、0、1、2、0后包装机的状态。图11自动包装机的结构图22顺序按下按钮3、2、3、0、1、2、03、2、3、0、1、2、...原创 2022-04-17 15:59:34 · 150 阅读 · 0 评论 -
Rails- 导轨 (Stack栈)
RailsPOJ - 1363There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It was possible to establish only a surface track. Moreov..原创 2021-07-30 10:32:12 · 256 阅读 · 0 评论 -
Text Reverse -文本反转(Stack栈)
Ignatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should reverse all the words and then output them.InputThe input contains several test cases. The first line of the input is a single integer T原创 2021-07-30 10:28:16 · 181 阅读 · 0 评论 -
愚人节的礼物 (栈)
愚人节的礼物目录愚人节的礼物HDU - 1870题意描述:输入只包含'(',')'和'B'三种字符的字符串,()表示一个盒子,B表示礼物,求最少需要拆多少个盒子才能拿到礼物B。解题思路:利用栈,遇到(就存入栈,遇到)表示有空盒子,不计入拆盒子的个数,便去掉在栈中相对应的(。当遇到B结束,计算栈中元素,即为需要拆开的最少盒子数。ACHDU - 1870四月一日快到了,Vayko想了个愚人的好办法——送礼物。嘿嘿,不要想的太好,这礼物可没那么简单,Vayko为...原创 2021-07-30 10:21:32 · 157 阅读 · 0 评论 -
简单计算器 HDU - 1237 (栈问题)
简单计算器HDU - 1237目录简单计算器题意描述解题思路易错分析完成AC读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。Input测试输入包含若干测试用例,每个测试用例占一行,每行不超过200个字符,整数和运算符之间用一个空格分隔。没有非法表达式。当一行中只有0时输入结束,相应的结果不要输出。Output对每个测试用例输出1行,即该表达式的值,精确到小数点后2位。Sample Input1 + 24 + 2 .原创 2021-07-30 10:10:32 · 1394 阅读 · 0 评论 -
火车问题 I (栈+字符匹配)
As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is the fastest all over the world ^v^). But here comes a problem, there is only o原创 2021-07-21 17:52:02 · 212 阅读 · 0 评论 -
Bad Hair Day坏头发日 (栈)
Some of Farmer John'sNcows (1 ≤N≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wants to count the number of other cows that can see the top of other cows' heads.Each cowihas a specified heighthi...原创 2021-07-21 17:43:23 · 105 阅读 · 0 评论