SHARE
TWEET

Untitled

a guest Mar 26th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <utility>
  4. #include <cstdio>
  5.  
  6. using namespace std;
  7. void lomnto (int t[], int n, int p);
  8. int main()
  9. {
  10.     int n, k;
  11.     scanf("%d %d", &n, &k);
  12.     int tab[n];
  13.     for (int i=0; i<n; i++)
  14.         scanf("%d", tab[i]);
  15.    
  16.     int piwot=tab[k-1];
  17.     lomnto(tab, n, piwot);
  18.    
  19.     for (int i=0; i<n; i++)
  20.         printf("%d ", tab[i]);
  21.     printf("\n");
  22.     return 0;
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top