jakaria_hossain

codeforce - Slightly Decreasing Permutations

Apr 3rd, 2019
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data