All problems

The Other Recall

hardPythonML Metrics

Harborline's customers never write in about the parcels that were opened for good reason. They write in about their own perfectly ordinary box arriving resealed with tape. The customer-experience team wants the mirror image of the compliance officer's number: of all the parcels that were genuinely fine, how many did the model have the sense to leave alone?

Task: Print the share of the genuinely clean parcels that the model did not flag.

Input

The first line holds an integer n, the number of parcels. Each of the next n lines holds two values separated by a single space: the true label first, the model's label second. Both are 1 (banned item inside) or 0 (clean). At least one parcel really was clean, so the answer always exists.

Output

One line: a number between 0 and 1 with exactly two digits after the decimal point. Print 1.00, not 1, when no clean parcel was disturbed.

Example:

Input:
5
0 0
0 1
0 0
1 1
1 0

Output:
0.67

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…