Vector
template<typename T>
class Vector {
int _size = 0, _cap = 1;
T *c = new T[1];
public:
bool empty() const { return _size == 0; }
int size() const { return _size; }
T& operator[](int idx) { return c[idx]; }
void pop_back() { if (_size > 0) --_size; }
void push_back(T __x) {
if (_size == _cap) {
T *old_c = c;
c = new T[2 * _cap];
memcpy(c, old_c, _cap * sizeof(T));
_cap *= 2;
delete[] old_c;
}
c[_size++] = __x;
}
};