Problem 702A — Maximum Increase | What is wrong in this Plz HELP I SPENT 2 Days finding bug PLZZZZ HELP.

Правка en2, от ABhinav2003, 2020-06-05 17:29:25

include<bits/stdc++.h>

using namespace std;

int sub(int a[] , int len) { if(len == 0) return 0;

if(a[len-1]<a[len-2])
    return 0;

return max(1+sub(a , len-1) , sub(a , len-2));

}

int main() { int len; cin>>len; int a[len]; for(int i = 0;i<=len-1;i++) { cin>>a[i]; } int m = sub(a , len); cout<<m; }

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский ABhinav2003 2020-06-05 17:56:45 95
en2 Английский ABhinav2003 2020-06-05 17:29:25 6 Tiny change: '\n\n#include' -> '\n#include'
en1 Английский ABhinav2003 2020-06-05 17:27:24 454 PLZZ HELP (published)