fork download
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <set>
  4. #include <utility>
  5. #include <vector>
  6. #include <array>
  7. using namespace std;
  8.  
  9. int main() {
  10. const int NMAX = 3;
  11. typedef pair<int, set<int>> solution;
  12. std::array<solution, NMAX*NMAX> memo;
  13. solution s;
  14. s.first = -1;
  15. std::fill(std::begin(memo),std::end(memo), s);
  16.  
  17. for (auto&& nextPair : memo)
  18. {
  19. std::cout << nextPair.first << " ";
  20. }
  21.  
  22. return 0;
  23. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
-1 -1 -1 -1 -1 -1 -1 -1 -1