1 #include<cstdio> 2 #include<vector> 3 using namespace std; 4 vector<int>a; 5 int main() 6 { 7 int b,i; 8 for(i=0;i<5;i++) 9 { 10 scanf("%d",&b); 11 a.push_back(b); 12 } 13 printf("%d ",a.size()); 14 a.resize(10); 15 printf("%d ",a.size()); 16 for(i=0;i<10;i++) 17 printf("%d ",a[i]); 18 printf(" "); 19 a.resize(4); 20 a.pop_back(); 21 for(i=0;i<20;i++) 22 printf("%d ",a[i]); 23 }