3140 - A Stack or A Queue?   

Description

 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3210

Input

Output

Sample Input  Download

Sample Output  Download

Tags




Discuss