题解 | #创建动态数组#
创建动态数组
http://www.nowcoder.com/practice/218b577112a24c23a41bdc01f28c18ac
#include<vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> result;
int i;
for(i=n;i<=2*n-1;i+=1){
result.push_back(i);
}
for(i=n;i<=2*n-2;i+=1){
printf("%d ",result[i-n]);
}
printf("%d\n",result[i-n]);
// write your code here......
return 0;
}