#include <iostream>
#include <vector>
#include <queue>
using namespace std;
struct TreeNode
{
int val;
TreeNode *left, *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
vector<vector<int> > v;
class Solution {
public:
void dfs(TreeNode *p, int cur, int sum, vector<int> v1) //v1若传引用结果为 5 4 11 2 、 5 4 11 2 8 4 5
{
if(!p)
return;
if(!p->left && !p->right)
{
if(cur + p->val == sum)
{
v1.push_......
阅读全文