Ilya_konstantinov

Untitled

Apr 18th, 2026
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | Source Code | 0 0
  1. class MyVector {
  2.     unsigned size_;
  3.     unsigned capacity_;
  4.     int* arr_;
  5.  
  6.  private:
  7.     int pref_cap(int n);
  8.  
  9.  public:
  10.     explicit MyVector(unsigned n = 0);
  11.  
  12.     ~MyVector();
  13.  
  14.     void Read(unsigned n);
  15.  
  16.     void PushBack(int x);
  17.  
  18.     void PopBack();
  19.  
  20.     void Insert(int x, int k);
  21.  
  22.     void Erase(int k);
  23.  
  24.     long long Sum();
  25.  
  26.     long double Mean();
  27.  
  28.     int Min();
  29.  
  30.     int Max();
  31. };
Advertisement
Add Comment
Please, Sign In to add comment