Josif_tepe

Untitled

May 9th, 2026
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <set>
  3. using namespace std;
  4. int main() {
  5.    
  6.     set<int> st = {1, 2};
  7.    
  8.     st.insert(4);
  9.     st.insert(0);
  10.    
  11.     set<int>::iterator it = st.find(2);
  12.    
  13.     if(it != st.end()) {
  14.         cout << *it << endl;
  15.     }
  16.    
  17.     if(st.count(0)) {
  18.         cout << "Da postoi" << endl;
  19.     }
  20.  
  21.     return 0;
  22. }
  23.  
  24.  
  25.  
Advertisement
Add Comment
Please, Sign In to add comment