Programming Question # #
Source: POJ (Coursera statement: The exercises completed on POJ will not count against the final results of Coursera. )
Note: Total time limit: 1000ms memory limit: 65536kB
Describe
The following program outputs the result:
1 2 6 7 8 9
Please fill in the blanks:
#include <iostream> #include <iterator> #include <set> using namespace Std;int main () { int a[] = {8 , 7,8,9,6,2,1}; Add your code ostream_iterator<int> O (cout, "") here; Copy (V.begin (), V.end (), O); return 0;}
Input
No
Output
1 2 6 7 8 9
Sample input
No
Sample output
1 2 6 7 8 9
1#include <iostream>2#include <iterator>3#include <Set>4 using namespacestd;5 intMain () {6 intA[] = {8,7,8,9,6,2,1};7 //Add your code here8 Set<int> V (A, A +7);9ostream_iterator<int> O (cout," ");Ten copy (V.begin (), V.end (), O); One return 0; A}
POJ C + + programming programming problem # #-STL1