|
||||||||||
Configuration filesTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 140 Accepted Submission(s): 22 Problem Description In daily project development process, we often use to the configuration file. Now we are going to solve the problem is simple. It is a complete configuration files writing and reading operation and output operation results. Input The input contains multiple test cases.The first line has one integer N (1 <= N<= 100), represent the number of the test cases.The second line has one integer M (1 <= M <= 2600) ,represent configuration files contain the M line data. The following next M line data represent the content of configuration files. The next line has one integer K (1 <= K <= 10000), represent the number of the operations. Then next K lines follow, each line represent a operation.there are two format in the operations. The first format is ¡°op nodeName variable Name value ¡° . The second format is ¡°op nodeName variableName¡±. If op is ¡°U¡± that represent that it is the Update operation. If op is ¡°G¡± that represent that it is the Get operation. If op is ¡°I¡± that represent that it is the Insert operation. The node¡¯s format in the configuration is ¡°[nodeName]¡±. The format of the value is ¡°variableName=value¡±. The nodeName, variableName in the configuration files all consist of lowercase character and each of them most contain 100 characters(include 100). The value consist of printable characters and most contain 100 characters(include 100) There may have some whitespaces (space or Tab key) front or behind the nodeName, variableName and value. There may have multiple same variables in the same node in the configuration file and the value of the variable to last shall prevail and the variable names and node name may be the same, in a configuration file won't exist in the same node name, inserting operations if a specified node name designated variables are the already existing failured. Output For each case, firstly print the ¡°case n:¡± n represent the number of the case.Then operate according to the output corresponding operation results, to ¡°U¡± operation if successfully output ¡°update succeed.¡± otherwise output ¡°update failured.¡±,to ¡°I¡± operation if successful ouput ¡°insert succeed.¡± otherwise ouput ¡°insert failured.¡± for ¡°G¡± operation if successful output a specified node specified under the value of the variable, or output ¡°not get the value.¡±. Sample Input
Sample Output
Author [FJAU]²ËÄñ Source | ||||||||||
|