CNS Paper
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Description
As the light of mathematics, Little A, a member of ACM team, is in love with prime numbers.
Unlike those who do not study in mathematics, Little A has a specific ability, which is that he can duplicate those items numbered by prime numbers.
One day, his tutor accidentally dropped a series of CNS paper that are all unsigned in front of him and coughed a few times...
For each page in the paper has a value, greedy Little A wants to pick up as much value as possible.(Duplicated counts) Please help him.
Input Format
There will be integers , in the first line, denoting the amount of different papers and the space of Little A's hand.
For the following line, each line contains integers and , (), denoting space cost and value of each page in the specific paper.
Hint: Papers are numbered from .
Output Format
Print the maximum value of the papers Little A can get in a single line.
3 10
1 5
2 5
1 1
26
2023年第五届秋季校赛第二周训练预备赛
- 状态
- 已结束
- 规则
- ACM/ICPC
- 题目
- 13
- 开始于
- 2023-11-19 13:30
- 结束于
- 2023-11-19 18:30
- 持续时间
- 5 小时
- 主持人
- 参赛人数
- 17