Question: Standard Input Output Constraints Standard input The input begins with two integers N and Q. Next come N lines each describing all divisions in the

Standard Input

Standard Input Output Constraints Standard input The input begins with two integersOutput

N and Q. Next come N lines each describing all divisions in

Constraintsthe following format: 1 [division_name] [parent_division] [size1] [size2)] 2 where [division_name] is

Standard input The input begins with two integers N and Q. Next come N lines each describing all divisions in the following format: 1 [division_name] [parent_division] [size1] [size2)] 2 where [division_name] is a child of [parent_division] [size1] is the number of employees in [division_name] but not any child division below it in the corporate hierarchy. [size2] is the number of employees in [division_name] including all divisions below it in the corporate hierarchy 4 5 6 If there is no parent, the [parent_division] will be equal to "NONE". 7 If a size is missing, the size value will be set to e 8 Next come Qlines each describing each query in the form 1 [division_name] Itype] 2 where [division_name] is a division name that exists in the corporate hierarchy, and [type] is either 1 or 2 4. 5 Standard input The input begins with two integers N and Q. Next come N lines each describing all divisions in the following format: 1 [division_name] [parent_division] [size1] [size2)] 2 where [division_name] is a child of [parent_division] [size1] is the number of employees in [division_name] but not any child division below it in the corporate hierarchy. [size2] is the number of employees in [division_name] including all divisions below it in the corporate hierarchy 4 5 6 If there is no parent, the [parent_division] will be equal to "NONE". 7 If a size is missing, the size value will be set to e 8 Next come Qlines each describing each query in the form 1 [division_name] Itype] 2 where [division_name] is a division name that exists in the corporate hierarchy, and [type] is either 1 or 2 4. 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!