iota函数 发表于 2024-01-12 分类于 ACM 阅读次数: 本文字数: 43 阅读时长 ≈ 1 分钟 12345678910//可以生成一个序列#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 << " ";} 12//output1 2 3 4 5 6 7 8 9 10 本文作者: FXJFXJ 本文链接: https://fxj.wiki/posts/8816c0b7/ 版权声明: 本博客所有文章除特别声明外,均采用 ZERO 许可协议。转载请注明出处!