class Solution {
public:
vector<vector<int>> decorateRecord(TreeNode* root) {
vector<vector<int>> v;
if(!root) return v;
queue<TreeNode*> que;
que.push(root);
while(!que.empty())
{
vector<int> v1;
for(int i = que.size();i>0;i--)
{
TreeNode* tmp = que.front();
que.pop();
v1.push_back(tmp->val);
if(tmp->left) que.push(tmp->left);
if(tmp->right) que.push(tmp->right);
}
v.push_back(v1);
}
return v;
}
};