考虑到这个人非常讨厌 stl 的 vector,所以这个人

细数 vector 的罪恶。

  1. 弱智的占用内存。
  2. 弱智的释放内存。
  3. 弱智的常数极大。
  4. 弱智的地址乱飘。
  5. 弱智的内存扩容。
template<class Tp>
struct Vector {Tp *st, *ed;uint sz;inline uint size() { return sz; }inline void resize(uint SZ) { st = ed = new Tp[SZ]; sz = SZ; }inline bool empty() { return !sz; }inline void push(Tp p) { *ed++ = p; }Tp& operator [] (const uint a) { return st[a]; }
} ;