SIMPLE BRUTEFORCE C++ SOLUTION
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:o(n^2)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:o(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int countPairs(vector<int>& v, int target) {\n        int n = v.size();\n        int i= 0;\n        int ans =0;\n        sort(v.begin(),v.end());\n        while(i < n){\n            int j = i + 1;\n            while(j < n && v[i] + v[j] < target){\n                ans++;\n                j++;\n            }\n            i++;\n        }\n        return ans;\n\n    }\n};\n```
['C++']