class Solution {
public:
    vector<vector<int> > FindContinuousSequence(int sum) {
        vector<vector<int> > res;
        
        int left = 1,right = 2;
        while(left != right){
            float n = (float(right) - float(left) + 1) / 2;
            int t = (right + left) * n;
            if(t == sum){
                vector<int> temp;
                for(int i = left;i <= right;i++) temp.push_back(i);
                res.push_back(temp);
                right++;
            }
            else if(t<sum) right++;
            else if(t>sum) left++;
        }
        return res;
    }
};