intnext(){ int res = *st.back().first; move(); return res; }
boolhasNext(){ return !st.empty(); } };
/** * Your Vector2D object will be instantiated and called as such: * Vector2D* obj = new Vector2D(vec); * int param_1 = obj->next(); * bool param_2 = obj->hasNext(); */