MCPcopy Create free account
hub / github.com/cp-algorithms/cp-algorithms / main

Function main

test/test_lis.cpp:23–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23int main() {
24 vector<int> a = {0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15};
25
26 assert(Method1::lis(a) == 6);
27
28 vector<int> subseq = {0, 4, 6, 9, 13, 15};
29 assert(Method1_Restore::lis(a) == subseq);
30
31 assert(Method2::lis(a) == 6);
32
33 assert(Method2_nlogn::lis(a) == 6);
34}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected