Josif_tepe

Untitled

Apr 9th, 2026
457
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     vector<int> v = {1, 2, 3};
  8.    
  9.     next_permutation(v.begin(), v.end());
  10.    
  11.     for(int i = 0; i < 3; i++)
  12.     {
  13.         cout << v[i] << " " ;
  14.     }
  15.     return 0;
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment