Given several inorder and preorder traversal sequences of a binary tree,
write a program to construct trees and output the number of leaf nodes.
Each node is represented by a 32-bit integer.
Time limit: 1sec.
The input is the inorder and preorder traversal sequences of a binary tree.
In each test case, there are 2 lines.
The inorder traversal sequence of the tree is in the first line, and the preorder one is in the second.
Note:The total number of nodes in a tree will not exceed 20000.
For each tree, please output the number of leaf nodes in a line.