标签:pre ret push names name amp code struct void
1 #define maxn 1000000 2 3 using namespace std; 4 5 struct Node 6 { 7 Node *left,*right; 8 }; 9 10 queue<Node*> freenodes; 11 Node node[maxn]; 12 13 void init() 14 { 15 for(int i = 0;i < maxn;i ++) 16 { 17 freenodes.push(&node[i]); 18 } 19 } 20 21 Node *newnode() 22 { 23 Node *u = freenodes.front(); 24 u->left = u->right = NULL; 25 freenodes.pop(); 26 return u; 27 } 28 29 void deletenode(Node* u) 30 { 31 freenodes.push(u); 32 }
标签:pre ret push names name amp code struct void
原文地址:https://www.cnblogs.com/Asurudo/p/9978720.html