classCQueue{public:
stack<int>stack1;
stack<int>stack2;CQueue(){}voidappendTail(int value){
stack1.push(value);}intdeleteHead(){if(stack1.empty())return-1;while(!stack1.empty()){int tmp=stack1.top();
stack1.pop();
stack2.push(tmp);}//delete headint res=stack2.top();
stack2.pop();while(!stack2.empty()){int temp=stack2.top();
stack2.pop();
stack1.push(temp);}return res;}};/**
* Your CQueue object will be instantiated and called as such:
* CQueue* obj = new CQueue();
* obj->appendTail(value);
* int param_2 = obj->deleteHead();
*/