摘要: 1、排名次:一般采用同分数则同名次的方法,但需要占一个排位。如 90 90 80 70 的排名为 1、1、3、4。可以先确定第一名,然后每次比较第i个和第i-1个,如果成绩相同,则i的名次为i-1的名次。如果成绩不同,i的名次为数组下标 + 1。 2、on-off信息配对:一般会有无效的on或off 阅读全文
posted @ 2018-02-01 23:57 ZHUQW 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the g 阅读全文
posted @ 2018-02-01 21:56 ZHUQW 阅读(187) 评论(0) 推荐(0) 编辑
摘要: It is said that in 2013, there were about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if 阅读全文
posted @ 2018-02-01 16:45 ZHUQW 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and 阅读全文
posted @ 2018-02-01 14:13 ZHUQW 阅读(139) 评论(0) 推荐(0) 编辑
摘要: The ranklist of PAT is generated from the status list, which shows the scores of the submittions. This time you are supposed to generate the ranklist 阅读全文
posted @ 2018-02-01 13:36 ZHUQW 阅读(463) 评论(0) 推荐(0) 编辑
摘要: 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 si 阅读全文
posted @ 2018-02-01 10:14 ZHUQW 阅读(155) 评论(0) 推荐(0) 编辑