0%

iota函数

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 << " ";
}
1
2
//output
1 2 3 4 5 6 7 8 9 10
  • 本文作者: FXJFXJ
  • 本文链接: https://fxj.wiki/posts/8816c0b7/
  • 版权声明: 本博客所有文章除特别声明外,均采用 ZERO 许可协议。转载请注明出处!