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[7]={1,2,3,4,5,6,7}; int j=6; int listfirst(int i) { int temp=0; for(int k=i+1;k<7;k++) { if(a[k]>a[i]) temp=max(temp,listfirst(k)); } if(temp==j) return temp; temp+=1 ; return temp; } int main() { int temp=0; // int j=4; for(int i=0;i<7;i++) { if(temp==j) break; temp=max(temp,listfirst(i)); } cout<<temp; }
run
|
edit
|
history
|
help
0
TraiectorieIdeala
Find Case Combinations of a String
HeapSort
test if nullptr
Matrix
unordered_map
Facebook - Split into monotonic sequences
code
Gauss v1.1
C++ state machine prototype