Advertisement
Josif_tepe

Untitled

Feb 5th, 2023
615
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <vector>
  4. #include <cmath>
  5. #include <set>
  6. #include <array>
  7. using namespace std;
  8.  
  9.  
  10.  
  11. int main() {
  12.     set<array<int, 3> > st;
  13.     st.insert({1, 2, 3});
  14.     st.insert({3, 2, 3});
  15.     st.insert({5, 2, 3});
  16.  
  17.  
  18.     for(set<array<int, 3> >::iterator it = st.begin(); it != st.end(); it++) {
  19.        
  20.         for(int i = 0; i < 3; i++) {
  21.             cout << it->at(i) << " ";
  22.         }
  23.         cout << endl;
  24.     }
  25.  
  26.  
  27.    
  28.     return 0;
  29. }
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement