好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

CodeforcesRound#260(Div.2)题解

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 ?≤?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 that represents the quality of the i -th laptop (the larger the number is, the higher is the quality).

All a i are distinct. All b i are distinct.

查看更多关于CodeforcesRound#260(Div.2)题解的详细内容...

  阅读:35次