MCPcopy Create free account
hub / github.com/Jonathan-Uy/CSES-Solutions / main

Function main

Dynamic Programming/Increasing Subsequence.cpp:9–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7multiset<int>::iterator it;
8
9int main(){
10 scanf("%d", &N);
11 for(int i = 0; i < N; i++){
12 scanf("%d", &a);
13 S.insert(a);
14 it = S.lower_bound(a);
15 it++;
16 if(it != S.end())
17 S.erase(it);
18 }
19 printf("%d\n", (int) S.size());
20}

Callers

nothing calls this directly

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected