
正文
POJ C++程序设计 编程题#1 编程作业—STL1
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
编程题#1
来源: POJ (Coursera声明:在POJ上完成的习题将不会计入Coursera的最后成绩。)
注意: 总时间限制: 1000ms 内存限制: 65536kB
描述
下面的程序输出结果是:
1 2 6 7 8 9
请填空:
#include <iostream>
#include <iterator>
#include <set>
using namespace std;
int main() {
int a[] = {8,7,8,9,6,2,1};
// 在此处补充你的代码
ostream_iterator<int> o(cout," ");
copy( v.begin(),v.end(),o);
return 0;
}
输入
无
输出
1 2 6 7 8 9
样例输入
无
样例输出
1 2 6 7 8 9
#include <iostream>
#include <iterator>
#include <set>
using namespace std;
int main() {
int a[] = {,,,,,,};
// 在此处补充你的代码
set<int> v(a, a+);
ostream_iterator<int> o(cout," ");
copy( v.begin(),v.end(),o);
return ;
}








