iota函数
//可以生成一个序列
#include<bits/stdc++.h>
using namespace std;
int main()
{
vector<int> p(10);
iota(p.begin(), p.end(), 1);
for( auto v:p)
cout << v << " ";
}
//output
1 2 3 4 5 6 7 8 9 10
//可以生成一个序列
#include<bits/stdc++.h>
using namespace std;
int main()
{
vector<int> p(10);
iota(p.begin(), p.end(), 1);
for( auto v:p)
cout << v << " ";
}
//output
1 2 3 4 5 6 7 8 9 10