#include#include using namespace std; int main() { stack a,b; b.push("http://www.acm.org/"); string s; while(cin>>s) { if(s=="QUIT") break; if(s=="VISIT") { string str;cin>>str; cout< 1) { a.push(b.top());b.pop(); cout< 0) { b.push(a.top()); cout<

#include#include using namespace std; int main() { stack a,b; b.push("http://www.acm.org/"); string s; while(cin>>s) { if(s=="QUIT") break; if(s=="VISIT") { string str;cin>>str; cout< 1) { a.push(b.top());b.pop(); cout< 0) { b.push(a.top()); cout<