#802. 射击游戏T5
射击游戏T5
No submission language available for this problem.
题目描述
游乐场新出了一个射击游戏。
现在有个射击目标,第个射击目标会在时刻后消失,即时刻前如果完成射击并命中目标,即可获得价值的奖励。
作为神枪手的蜗牛老师,为了保证每次都命中目标,每个单位时刻只能瞄准一个目标并射击,才能保证每次都能命中目标。
现在问,蜗牛老师能够获得的最大奖励是多少?
输入格式
第一行一个整数,表示有个射击目标。
接下来行,每行个整数:。
输出格式
一个整数,表示所求答案。
样例数据
input
4
1 19
2 10
1 20
2 15
output
35
数据规模与约定
20%的数据,n<=100。
40%的数据,n<=50000。
100%的数据,n<=200000,,。
时间限制:
空间限制:
Background
Special for beginners, ^_^
Description
Given two integers x and y, print the sum.
Format
Input
Two integers x and y, satisfying .
Output
One integer, the sum of x and y.
Samples
123 500
623
Limitation
1s, 1024KiB for each test case.
Related
In following homework: