123456789101112131415161718 |
- #include <bits/stdc++.h>
- using namespace std;
- typedef vector<int> VI;
- typedef pair<int, int> PII;
- typedef vector<PII> VPII;
- #define STRICTLY_INCREASNG
- #include "LongestIncreasingSubsequence.cpp"
- int main() {
- VI v = {3, 4, 7, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
- VI r = LongestIncreasingSubsequence(v);
- for(int i = 0; i < r.size()-1; i++)
- assert(r[i] < r[i+1]);
- assert(r.size() == 10);
- return 0;
- }
|