Implement C with the linear approach(the monotonous queue).

用单调队列实现的版本