POJ1028 Web Navigation】的更多相关文章

题目来源:http://poj.org/problem?id=1028 题目大意: 模拟实现一个浏览器的“前进”和“回退”功能.由一个forward stack和一个backward stack实现. 打开浏览器时的正位于http://www.acm.org/.然后浏览器会接受下面四种命令: BACK:将当前页面压入forward stack,将backward stack顶部页面弹出,成为当前页面.若当前backward stack为空,忽略该命令: FORWARD:将当前页面压入backwa…
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 reached by moving backward and forward. In this prob…
这题是01年East Central North的A题,目测是签到题 Description 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 reach…
Web Navigation Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 31088   Accepted: 13933 Description Standard web browsers contain features to move backward and forward among the pages recently visited. One way to implement these features…
Web Navigation Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 30828   Accepted: 13821 Description Standard web browsers contain features to move backward and forward among the pages recently visited. One way to implement these features…
Description 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 reached by moving backward and forward.…
题目链接:http://poj.org/problem? id=1028 Description 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 rea…
一.Description 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 reached by moving backward and forward…
原题链接 题目大意:模拟一个浏览器,打开一个网页.后退或者前进,输出网址. 解法:用两个堆栈分别表示后退保存的网页和前进保存的网页.初始化时把当前页面压入后退堆栈的栈顶.要注意几点,一个是每次记得要清空两个堆栈,另一个,如果后退之后又打开了新的网页,前进的堆栈要清空,这和真实的浏览器的结果是一致的. 参考代码: #include<iostream> #include<string> #include<stack> using namespace std; stack&l…
考查代码能力的题目.也能够说是算法水题,呵呵. 推荐新手练习代码能力. 要添加难度就使用纯C实现一下stack,那么就有点难度了,能够使用数组模拟环形栈.做多了,我就直接使用STL了. #include <stdio.h> #include <iostream> #include <stack> #include <string> using namespace std; int main() { stack<string> forward; s…