1028-WEB Navigation
1314 ワード
:
, ( )
C++ ,
:
visit: forward
back
#include
#include
#include
#include
#include
using namespace std;
string str;
stack backward;
stack forward;
string current = "http://www.acm.org/";
int main()
{
//freopen("data.in", "rb", stdin);
while(cin >> str) {
if(str == "QUIT")
break;
else if(str == "VISIT") {
backward.push(current);
cin >> current;
cout <
//////////////////
:
# include # include # include # include using namespace std;int main(){
string back[101];
string forward[101];
string cur="http://www.acm.org/";
string str;
int b=0,f=0;
cin>>str;
while(str!="QUIT")
{
if(str=="VISIT")
{
back[b++]=cur;
cin>>cur;
f=0;
cout<>str;
}
return 0;}