栈 && 队
文章平均质量分 67
Violet-Guo
努力一直前进的程序猿一枚~~
展开
-
HDU - 1870 - 愚人节的礼物
HDU 1870.愚人节的礼物Problem Description四月一日快到了,Vayko想了个愚人的好办法——送礼物。嘿嘿,不要想的太好,这礼物可没那么简单,Vayko为了愚人,准备了一堆盒子,其中有一个盒子里面装了礼物。盒子里面可以再放零个或者多个盒子。假设放礼物的盒子里不再放其他盒子。用()表示一个盒子,B表示礼物,Vayko想让你帮她算出愚人指数,即最少需要拆多少个盒子才能拿到礼物。I原创 2015-08-08 20:15:16 · 551 阅读 · 0 评论 -
POJ - 1363 - Rails(栈)
POJ 1363.Rails Time Limit: 1000MS Memory Limit: 10000KDescriptionThere is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century.原创 2015-08-03 11:28:42 · 514 阅读 · 0 评论 -
HDU - 1237 - 简单计算器(栈)
HDU 1237.简单计算器Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem Description读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。Input测试输入包含若干测试用例,每个测试用例占一行,每行不超过200个原创 2015-08-03 13:48:31 · 2026 阅读 · 1 评论 -
POJ - 3984 - 迷宫问题
POJ 3984.迷宫问题Description定义一个二维数组: int maze[5][5] = {0, 1, 0, 0, 0,0, 1, 0, 1, 0,0, 0, 0, 0, 0,0, 1, 1, 1, 0,0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。Input一个5 × 5原创 2015-08-10 15:40:21 · 885 阅读 · 0 评论 -
UVA - 11995 - I Can Guess the Data Structure!(栈、队列、优先队列)
UVA 11995.I Can Guess the Data Structure!DescriptionThere is a bag-like data structure, supporting two operations: operation meaning 1 x Throw an element x into the bag. 2 Take out an eleme原创 2015-08-10 14:24:00 · 994 阅读 · 0 评论 -
HDU - 1873 - 看病要排队(模拟栈)
HDU 1873.看病要排队Problem Description看病要排队这个是地球人都知道的常识。 不过经过细心的0068的观察,他发现了医院里排队还是有讲究的。0068所去的医院有三个医生(汗,这么少)同时看病。而看病的人病情有轻重,所以不能根据简单的先来先服务的原则。所以医院对每种病情规定了10种不同的优先级。级别为10的优先权最高,级别为1的优先权最低。医生在看病时,则会在他的队伍里面原创 2015-08-08 21:06:21 · 927 阅读 · 0 评论 -
HDU - 1022 - Train Problem I(栈)
HDU 1022.Train Problem I(栈) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionAs the new term comes, the Ignatius Train Station is very busy原创 2015-08-09 11:39:39 · 616 阅读 · 0 评论 -
HDU - 1702 - ACboy needs your help again!(栈&&队列)
HDU 1702.ACboy needs your help again!(栈&&队列) Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionACboy was kidnapped!! he miss his mother ve原创 2015-08-09 14:20:09 · 558 阅读 · 0 评论 -
hihoCoder - 1103 - Colorful Lecture Note(栈、字符串处理)
#1103 : Colorful Lecture Note 时间限制:10000ms 单点时限:1000ms 内存限制:256MB描述Little Hi is writing an algorithm lecture note for Little Ho. To make the note more comprehensible, Little Hi tries原创 2015-08-08 20:08:41 · 928 阅读 · 0 评论 -
UVA - 673 - Parentheses Balance(栈)
UVA 673.Parentheses Balance(栈) You are given a string consisting of parentheses () and []. A string of this type is said to be correct:(a) if it is the empty string (b) if A and B are correct,原创 2015-08-03 15:08:51 · 1034 阅读 · 0 评论