아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Non Classical Problem

시간 제한1초메모리 제한1024 MB

요약
N개의 분수 ai/bi가 주어질 때 최솟값, 최댓값, 그리고 합을 소수 오차 1e-6 이내로 출력한다.
난이도

보통10점 중 4점

유형
수학, 정렬, 그리디, 구현
정답자
아직 제출이 없습니다

문제

Usually, the easiest problem in a contest, especially in the practice session, is to find either the minimum integer, the maximum integer, or the sum of a given multiset of integers. We find that such problem is too classical and too boring.

Since this is an ICPC, we are going to pose you with a more challenging problem! Instead of giving you a multiset of integers, we will give you a multiset of real numbers. The ith real number can be represented as a pair of integers (ai, bi) and the value of the number is ai/bi.

ind the minimum number, maximum number, and the sum of the given real numbers!

입력

Input begins with a line containing an integer: N (1 ≤ N ≤ 100 000) representing the size of the given multiset. The next N lines each contains two integers: ai bi (1 ≤ ai, bi ≤ 2 × 109) representing the real numbers.

출력

Output in a line three real numbers (each separated by a single space): the minimum number, the maximum number, and the sum of the given numbers, respectively. Your answer will be considered correct if the relative or absolute difference between your answer and judge’s answer is not more than 10−6.

예제1

  1. 예제 1

    입력
    5
    1 2
    2 4
    3 4
    4 3
    1 5
    
    예상 출력
    0.20000000000 1.33333333333 3.28333333333