CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - 1100
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Sub Category
GUI Develop
Windows Kernel
WinSock-NDIS
Driver Develop
ADO-ODBC
GDI-Bitmap
CSharp
.net
Multimedia Develop
Communication
Shell api
ActiveX/DCOM/ATL
IME Develop
ISAPI-IE
Hook api
Screen saver
DirextX
Process-Thread
Console
File Operate
Printing program
Multi Monitor
DNA
Other
Search - 1100 - List
[
CSharp
]
sta
DL : 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
Date
: 2008-10-13
Size
: 7.31kb
User
:
赖荣伟
[
CSharp
]
sta
DL : 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
Date
: 2025-12-19
Size
: 7kb
User
:
赖荣伟
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.