Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
LIS
//g++ 7.4.0 #include <bits/stdc++.h> using namespace std; int listfirst(int i); int a[5]={1,2,3,4,5}; int lisfirst(int i) { int temp=0; for(int k=i+1;k<5;k++) { if(a[k]>a[i]) temp=max(temp,listfirst(k)); } temp+=1 ; return temp; } int main() { //int a[]={1,2,3,4,5}; int temp=0; // cout<<a[0]<<endl; for(int i=0;i<5;i++) temp=max(temp,lisfirst(i)); cout<<temp; }
run
|
edit
|
history
|
help
0
container store pointer
chocolate Distribution Problem
TempSpecial2
Expected types
stl_sizeof.cc
new
Generating π from 1,000 random numbers
ThreadPool
Anziktet
Dar