C++
\nclass Solution {\npublic:\n    int kIncreasing(vector<int>& arr, int k) {\n        int n = arr.size();\n        \n        int result = arr.size();\n        fo
```\nclass Solution {\npublic:\n    int kIncreasing(vector<int>& arr, int k) {\n        int n = arr.size();\n        \n        int result = arr.size();\n        for (int i=0; i<k; ++i) {\n            vector<int> seq = {arr[i]};\n            for (int j=i+k; j<n; j+=k) {\n                if (arr[j] >= seq.back()) {\n                    seq.push_back(arr[j]);\n                } else {\n                    int offset = std::upper_bound(seq.begin(), seq.end(), arr[j]) - seq.begin();\n                    seq[offset] = arr[j];\n                }\n            }\n            \n            result -= seq.size();\n        }\n        return result;\n    }\n};\n```
[]