标签:
来源: 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
1 #include <iostream> 2 #include <iterator> 3 #include <set> 4 using namespace std; 5 int main() { 6 int a[] = {8,7,8,9,6,2,1}; 7 // 在此处补充你的代码 8 set<int> v(a, a+7); 9 ostream_iterator<int> o(cout," "); 10 copy( v.begin(),v.end(),o); 11 return 0; 12 }
标签:
原文地址:http://www.cnblogs.com/dagon/p/4783213.html