![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
查找元素
小魚兒.
天下皆白,唯我独黑!
展开
-
3.2 PAT A 1036 Boys vs Girls (25分)(
1036 Boys vs Girls (25分)This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students.Input Specification:Each...原创 2020-03-01 14:46:03 · 95 阅读 · 0 评论 -
3.2 PAT A1006 Sign In and Sign Out (25分)(比较最大最小型)
1006 Sign In and Sign Out (25分)At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the recor...原创 2020-02-29 16:41:59 · 73 阅读 · 0 评论 -
3.2 PAT A1011 World Cup Betting (20分)(查找元素)
1011 World Cup Betting (20分)With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World ...原创 2020-02-29 15:41:44 · 85 阅读 · 0 评论 -
3.2 PAT B1028 人口普查 (20分)(查找元素)
1028 人口普查 (20分)某城镇进行人口普查,得到了全体居民的生日。现请你写个程序,找出镇上最年长和最年轻的人。这里确保每个输入的日期都是合法的,但不一定是合理的——假设已知镇上没有超过 200 岁的老人,而今天是 2014 年 9 月 6 日,所以超过 200 岁的生日和未出生的生日都是不合理的,应该被过滤掉。输入格式:输入在第一行给出正整数 N,取值在(0,105];...原创 2020-02-29 15:02:41 · 98 阅读 · 0 评论 -
3.2 PAT B1041 考试座位号 (15分)(查找元素——哈希)
1041 考试座位号 (15分)每个 PAT 考生在参加考试时都会被分配两个座位号,一个是试机座位,一个是考试座位。正常情况下,考生在入场时先得到试机座位号码,入座进入试机状态后,系统会显示该考生的考试座位号码,考试时考生需要换到考试座位就座。但有些考生迟到了,试机已经结束,他们只能拿着领到的试机座位号码求助于你,从后台查出他们的考试座位号码。输入格式:输入第一行给出一个正整数 N(≤...原创 2020-02-28 15:55:42 · 166 阅读 · 0 评论