class CQueue {
public:
stack<int> a;
stack<int> b;
CQueue() {
}
void appendTail(int value) {
a.push(value);
}
int deleteHead() {
if (b.empty())
{
while (!a.empty())
{
b.push(a.top());
a.pop();
}
}
if (b.empty())
{
return -1;
}
else
{
int val = b.top();
b.pop();
return val;
}
}
};