Advertisement
jakaria_hossain

codeforce - Slightly Decreasing Permutations

Apr 3rd, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define fastread()(ios_base::sync_with_stdio(false),cin.tie(NULL));
  4. int main()
  5. {
  6. fastread()
  7. int n,k;
  8. cin>>n>>k;
  9. for(int i=0;i<k;i++)printf("%d ",n-i);
  10. printf("1");
  11. for(int i=2;i<=n-k;i++)printf(" %d",i);
  12. printf("\n");
  13. return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement