Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <utility>
- #include <cstdio>
- using namespace std;
- void lomnto (int t[], int n, int p);
- int main()
- {
- int n, k;
- scanf("%d %d", &n, &k);
- int tab[n];
- for (int i=0; i<n; i++)
- scanf("%d", tab[i]);
- int piwot=tab[k-1];
- lomnto(tab, n, piwot);
- for (int i=0; i<n; i++)
- printf("%d ", tab[i]);
- printf("\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement