Longest Increasing Subsequence (LIS) - Slow O(n^2) - Preparation to IOI Part 3