11429 - Iterator (Implement a vector 5)   

Description

Warning: You are not allowed to use:

1. any static variables

2. any variables which is not inside a function

3. malloc and free

This problem is similar to 11410 - Implement vector 2 and 11423 - Simulating Iterators.

But this time, you have to implement a intact Iterator.

member function of Vector:

erase: erase elements which is pointed by begin to end ([begin,end)). While begin is equal to end, do not erase any elements.

insert: insert elements at position pos. The insert elements are from iterators which are pointed by begin to end ([begin,end)). While begin is equal to end, do not insert any elements.

Input

Input is a sequence of non-negative integer (smaller than 100).

Output

Complete Vector (constructor, destructor, begin, end, erase, insert, push_back and reserve) and Iterator (all data member functions).

Sample Input  Download

Sample Output  Download

Partial Judge Code

11429.cpp

Partial Judge Header

11429.h

Tags




Discuss