Home  >  Article  >  Database  >  Codeforces Round #260 (Div. 2) 题解

Codeforces Round #260 (Div. 2) 题解

WBOY
WBOYOriginal
2016-06-07 15:31:42924browse

Input The first line contains an integer n ( 1?≤? n ?≤?10 5 ) — the number of laptops. Next n lines contain two integers each, a i and b i (1?≤? a i ,? b i ?≤? n ) , where a i is the price of the i -th laptop, and b i is the number th

Input

The first line contains an integer n (1?≤?n?≤?105) — the number of laptops.

Next n lines contain two integers each,ai andbi(1?≤?ai,?bi?≤?n), whereai is the price of thei-th laptop, and bi is the number that represents the quality of thei-th laptop (the larger the number is, the higher is the quality).

All ai are distinct. Allbi are distinct.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn