Скоро Codeforces Round 1133 (Div. 1, Div. 2)! Регистрация здесь. ×

Problem 702A — Maximum Increase | What is wrong in this Plz HELP I SPENT 2 Days finding bug PLZZZZ HELP.
Разница между en2 и en3, 95 символ(ов) изменены
↵
~~~~~↵
#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;↵
}
``[LINK TO THE PROBLEM](https://codeforces.me/problemset/problem/702/A)``↵
~~~~~↵
↵
↵

История

 
 
 
 
Правки
 
 
  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)