fork download
  1. #include <iostream>
  2. #include<stack>
  3. #include<string>
  4. using namespace std;
  5. int k,c,n,i,l,a[100];
  6. stack<int>b;
  7.  
  8.  
  9. int main() {
  10. cin>>n,k;
  11. for(l=1;l<=n;l++){
  12. cin>>a[l];
  13. }
  14. for (i=1;i<=k;i++){
  15. for (l=1;l<=n;l++){
  16. c=a[l];
  17. if (a[l]>c){
  18. b.push(a[l]);
  19. }
  20. }
  21. }
  22. return 0;
  23. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
Standard output is empty