Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
LIS_NEW
//g++ 7.4.0 #include <bits/stdc++.h> using namespace std; int listfirst(int i); int a[6]={8,9,10,3,1,13}; int j=4; int listfirst(int i) { int temp=0; for(int k=i-1;k>=0;k--) { if(a[k]<a[i]) temp=max(temp,listfirst(k)); } if(temp==j) return temp; // temp+=1 ; return 1+temp; } int main() { int temp=0,i; // int j=4; for(i=1;i<6;i++) { if(temp == j) break; temp=max(temp,listfirst(i)); cout<<temp<<endl; } cout<<"LIS: "<<temp<<" at Index: "<<i; }
run
|
edit
|
history
|
help
0
frndclass
template inhertinace
c2p_update
4149 coj TL
Palindromo
C++ virtual dispose
Fibonacci
point to a rvalue
Hash(Prototipo)
Pollard Rho Brent Integer Factorization - 11476 - Factorizing Larget Integers