[c++] dynamic programming with a image.
https://bit.ly/2B5OZtn\n\nGiven string s and number k, find the minimal numbers of\ncharacters of s such as every k substring is palindrome.\n\nFor an instance,
https://bit.ly/2B5OZtn\n\nGiven string `s` and number `k`, find the minimal numbers of\ncharacters of `s` such as every `k` substring is palindrome.\n\nFor an instance, `s = "abc", k = 2`.\n\nWe can divide "abc" by 2 groups like these.\n\n```\na bc\nab c\n```\n\nWhen we make a substring, if it is palindrome we don\'t need any\ncharacters to be changed. So we need to consider all cases for\ngrouping and count minimal numbers of characters to be changed.\n\nDynamic programming is a good solution.\n\nThis is a subproblem for DFS.\n\n```c\nint dfs(vector<vector<int>>& C, string& s, int i, int k)\n\nreturn: minimal number of characters to be changed.\n     c: cache for i, k\n     s: s is given\n     i: index of s\n     k: number of groups to make\n```\n\nThis is a recursion tree for `s = "aabbc", k = 3`\n\n![image](https://assets.leetcode.com/users/iamslash/image_1592086854.png)\n
[]