文件名称:sta
- 所属分类:
- C#编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2008-10-13
- 文件大小:
- 7.31kb
- 下载次数:
- 0次
- 提 供 者:
- 赖**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
设当前系统中有多个栈在工作,多栈模拟问题要求模拟当前系统中各栈的工作状态。
由文件input.txt给出输入数据。第1行是正整数n,表示有n个栈操作。接下来的n行,
每行给出一个栈操作指令。栈操作指令“PUSH A B”表示将正整数B加入编号为A的栈顶;
栈操作指令“POP A”表示输出编号为A的栈顶元素输入文件示例 输出文件示例
input.txt output.txt
7
PUSH 1 100
PUSH 1 200
PUSH 2 300
PUSH 2 400
POP 3
POP 1
POP 2
0
200
4-set up the current system in a number of warehouse work, Stack simulation requires simulation of the current system of state stack. Input.txt documents presented by the input data. Line 1 is a positive integer n, n-stack operation. N the next trip, each trip is a stack operating instructions. Stack operating instructions "PUSH A B" is said to integer numbers of B to A stack; Stack operating instructions "A POP," said output No. A stack of documents imported elements example output file example inpu t.txt 1100 output.txt 7 PUSH PUSH PUSH 1200 2300 PUSH 2400 POP POP a POP 3 2 0200 4
由文件input.txt给出输入数据。第1行是正整数n,表示有n个栈操作。接下来的n行,
每行给出一个栈操作指令。栈操作指令“PUSH A B”表示将正整数B加入编号为A的栈顶;
栈操作指令“POP A”表示输出编号为A的栈顶元素输入文件示例 输出文件示例
input.txt output.txt
7
PUSH 1 100
PUSH 1 200
PUSH 2 300
PUSH 2 400
POP 3
POP 1
POP 2
0
200
4-set up the current system in a number of warehouse work, Stack simulation requires simulation of the current system of state stack. Input.txt documents presented by the input data. Line 1 is a positive integer n, n-stack operation. N the next trip, each trip is a stack operating instructions. Stack operating instructions "PUSH A B" is said to integer numbers of B to A stack; Stack operating instructions "A POP," said output No. A stack of documents imported elements example output file example inpu t.txt 1100 output.txt 7 PUSH PUSH PUSH 1200 2300 PUSH 2400 POP POP a POP 3 2 0200 4
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 39709594sta.rar 列表 新建文件夹 (6)\input.txt 新建文件夹 (6)\output.txt 新建文件夹 (6)\sta.cpp 新建文件夹 (6)\sta.dsp 新建文件夹 (6)\sta.dsw 新建文件夹 (6)\sta.ncb 新建文件夹 (6)\sta.opt 新建文件夹 (6)\sta.plg 新建文件夹 (6)