richest专题

PAT 甲级 1055 The World‘s Richest

PAT 甲级 1055 The World’s Richest 这道题一次AC,但是后来看《算法笔记·上机训练实战指南》中的解析,说由于M<100,所以每个年龄读入100个人,就可以不读入了,这样能显著提高时间,否则测试点二过不了。但是没有写这个预处理也过了,回去看了看时间是400ms,猜想应该是传参都用的是传引用调用,改成传值调用之后果然超时。 解析也是用传值调用写的,传引用不香吗。 #i

【PAT 1055】The World's Richest 结构体排序剪枝

1055. The World's Richest (25) 时间限制 200 ms 内存限制 128000 kB 代码长度限制 16000 B 判题程序 Standard Forbes magazine publishes every year its list of billionaires based on the annual r

1055 The World‘s Richest (25 分)

1055 The World’s Richest (25 分) Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world’s wealthiest people. Now you are supposed to simulate this job,