C++ 11 line
```\n    int kIncreasing(vector& arr, int k) {\n        int numGood = 0;\n        for(int i = 0; i<k; i++){\n            vector v;\n            for(int j=i;j<ar
```\n    int kIncreasing(vector<int>& arr, int k) {\n        int numGood = 0;\n        for(int i = 0; i<k; i++){\n            vector<int> v;\n            for(int j=i;j<arr.size();j+=k){\n                auto it = upper_bound(v.begin(), v.end(), arr[j]);\n                if(it == v.end()) v.push_back(arr[j]);\n                else *it = arr[j];\n            }\n            numGood += v.size();\n        }\n        return arr.size() - numGood;\n    }
[]