## CCCHK '08 J1 - Best fish

View as PDF

Points: 3
Time limit: 1.0s
Memory limit: 64M

Problem type

Two friends, Casper and Natalie went fishing. They caught a lot of fish. Casper pointed out that he had the longest fish, but Natalie said she had the heaviest fish. They agreed that they would determine the best fish as being the one whose product of the weight and length was the largest.

Your job is to determine who caught the best fish.

#### Input Specification

The input begins with an integer which represents the total number of fish that Casper caught. Then each of the records follows on its own line. Each record consists of two positive integers each less than : the weight followed by the length of that particular fish. After these records, there is a number which represents the total number of fish that Natalie caught.
On the next lines, there is one record per line, as outlined above.

#### Output Specification

The output will be Casper if he has caught the best fish, or Natalie if she has caught the best fish, or Tie if they caught equally good fish.

#### Sample Input

3
10 3
3 11
4 4
4
10 2
29 1
16 2
6 6

#### Sample Output

Natalie

• Super_User  commented on Jan. 10, 2020, 7:48 p.m. edit 3

If you're confused about how to calculate which fish is 'worth' more;

They agreed that they would determine the best fish as being the one whose product of the weight and length was the largest

Explanation: This means that when they input the two number (of the biggest fish), you multiply the two numbers of the two fish and compare which one is bigger

• Kirito  commented on Nov. 6, 2017, 7:52 p.m.

Please note that Casper doesn't necessarily have the longest fish, and that Natalie doesn't necessarily have the heaviest fish.

• Emma_Chou  commented on April 6, 2017, 10:39 p.m. edited

There is no judge available for this question???

• Xyene  commented on April 6, 2017, 11:06 p.m.

Issues at our host's datacenter; they've been resolved now.