题目描述
Background
On a day in 2020, our classmate yyy2015c01 wanted to develop an IDE.
Problem Description
As a member of his development team, you were unfortunately selected by yyy2015c01 to join the Debugger development group.
yyy2015c01 envisioned the Debugger to consist of several parts, one of which is the Call Stack, known in Chinese as "调用栈".
Since the IDE is currently in beta, the development team needs to first create a Call Stack that can recognize parameter lists to see how it works. This task has been assigned to you.
The imagined Call Stack should be able to recognize parameter lists of int and char types to distinguish different functions. The rules are:
int fac1(int n);
and
int fac1(char n);
are considered different functions; however,
int Fac1(int n,int m);
and
int FAC1(int x,int y);
are considered the same function. This means the Call Stack recognizes not the parameter names but their types and the function names ignoring case.
Note: int main() may or may not appear; regardless of its presence, it should not be counted as a function.
Please write a Call Stack that outputs how many distinct functions (based on their parameter lists) are there in the program after all function calls (guaranteed that each function is called at least once).
Input Format
The input consists of $n + 1$ lines: The first line is a positive integer $n$, indicating the total number of call operations. Lines $2$ to $n+1$ each contain a function call information (strictly following the format of the sample input), with no extra characters.
Output Format
The output consists of one line: a positive integer $m$, indicating how many distinct parameter lists there are among the calls.
Sample Input and Output
Sample Input #1
2
FAC1 (N=233, M=65 'A', A=0)
main ()
Sample Output #1
1
Sample Input #2
2
fac1 (N=250)
FAC1 (a=987)
Sample Output #2
1
Notes
Each function has at most $10$ parameters, and the length of each input line does not exceed $255$.
A tribute to the protagonist of this problem, yyy2015c01!
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分