K12教育赛事综合服务平台
聚乐之家官方网站
下载聚乐之家官方App
专注青少年竞赛题库网站
#include <iostream> #include <vector> using namespace std; int main() { vector<int> v; v.reserve(10); v.push_back(1); v.push_back(2); v.pop_back(); cout << v.size() << "," << v.capacity() << endl; return 0; }
1,10
2,10
1,2
2,2