[c++]bruteforce-sort,135ms
class Solution\n{\npublic:\n\n    vector checkArithmeticSubarrays(vector &nums, vector &l, vector &r)\n    {\n        int n = nums.size(),m = l.size();\n       
class Solution\n{\npublic:\n\n    vector<bool> checkArithmeticSubarrays(vector<int> &nums, vector<int> &l, vector<int> &r)\n    {\n        int n = nums.size(),m = l.size();\n        vector<bool> v(m);\n        int i = 0;\n        while (m--)\n        {\n            int y = r[i] - l[i];\n            int j = 0;\n            vector<int> mp;\n            while (y >= 1){\n                mp.push_back(nums[l[i] + j]);\n                y--;\n                j++;\n            }\n            mp.push_back(nums[r[i]]);\n            sort(mp.begin(), mp.end());\n            int sum = 0;\n            for (int k = 0; k < mp.size() - 2; k++){\n                if (mp[k + 1] - mp[k] == mp[k + 2] - mp[k + 1])\n                    sum++;\n                else\n                    break;\n            }\n            if (sum == mp.size() - 2)\n                v[i] = true;\n            else\n                v[i] = false;\n            i++;\n        }\n        return v;\n    }\n};
['C++']