template<typename T> struct Queue { T val[N]; int hh, tt; void clear() { hh = 0, tt = -1; } bool empty() { return hh > tt; } void push(T x) { val[ ++ tt] = x; } void pop() { hh ++ ; } T front() { return val[hh]; } } ;