One root. You might have seen that on the CSE 2k9 shirts.
Unix computers have one root directory - which might in turn have several directories contained inside of it,each with different names.
A directory is uniquely identified by its name and its parent directory (the directory it is directly contained in). This is usually encoded in a path,
which consists of several parts each preceded by a forward slash ('/').
Breaking it down ,
epicness is contained in the seaweed directory
seaweed is contained in the home directory
home in contained whithin the root directory .
To the point now -
In order to create a directory, you use the mkdir command.You specify a path and then mkdir will create the directory described by that path(
but only if the parent directory already exists).
For example, if you wanted to create the "/home/seaweed/epicness" and "/home/seaweed/awesomeness"
directories from scratch, you would need four commands:
Given the full set of directories already existing on your computer,and a set of new directories you want to create if they do not already exist-
How many MKDIR commands do you need to use ?
The first line of the input gives the number of test cases, T.
Each case begins with a line containing two integers N and M.
The next N lines each give the paths of pre-existing directories.
The next M lines each give the path of the directories you want to create.
A path consists of one or more lower-case alpha-numeric strings
(i.e., strings containing only the symbols 'a'-'z' and '0'-'9') preceded by '/' .
For each test case, output one line containing "Case #x: y",
where x is the case number and y is the number of mkdir you need.
1 <= T <= 100.
0 <= N <= 100.
1 <= M <= 100.
Length of path <=100
Case #1: 4
Case #2: 0
Case #3: 4
Problem Setter :- Kirti Vardhan Rathore