Hungry OWL and Foolish EAGLE (Easy)
Practice
1.7 (3 votes)
Very Easy
Problem
52% Success 423 Attempts 10 Points 1s Time Limit 256MB Memory 1024 KB Max Code

In a magical forest, EAGLE went to OWL for classes. OWL taught EAGLE N stories with chapter numbers 1 to N. At the end of the day, OWL used to ask EAGLE to repeat all the Chapter Numbers with its Story Name.

OWL is a nice teacher, so didn't care of the order of the chapters told by EAGLE.
Also OWL is always hungry and need to rush for lunch so, OWL counts a chapter correct, even if the Story Name for a corresponding chapter number is jumbled.
But, if a Story Name (same or jumbled) gets mixed with another Chapter Number, it is said to be wrong.

After EAGLE completes writing all the chapters, You need to calculate number of mistakes committed by him.

Standard Input:
Each input contains 2*N + 1 lines. First line contains N, representing number of chapters.
Next N Lines contains chapters taught by OWL by a integer X and a string S.
X -> Chapter number
S -> Chapter Name

Next N lines contains the answer written by EAGLE containg integer X and string S.
X-> Chapter number.
S-> Chapter Name.


Standard Output:
Print a single integer denoting number of mistakes done by EAGLE.

Constraints:
1<=n<=100
1<=Length of story name (consisting of small character only (a-z) ) <=100

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:10
3 votes
Tags:
Very-Easy
Points:10
1 votes
Tags:
Very-Easy
Points:10
1 votes
Tags:
Very-Easy
Editorial

No editorial available for this problem.