摘要: 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. Inp 阅读全文
posted @ 2018-03-09 12:54 王清河 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-03-09 11:11 王清河 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 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 ba 阅读全文
posted @ 2018-03-09 10:29 王清河 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 为了用事实说明挖掘机技术到底哪家强,PAT组织了一场挖掘机技能大赛。现请你根据比赛结果统计出技术最强的那个学校。 输入格式: 输入在第1行给出不超过105的正整数N,即参赛人数。随后N行,每行给出一位参赛者的信息和成绩,包括其所代表的学校的编号(从1开始连续编号)、及其比赛成绩(百分制),中间以空格 阅读全文
posted @ 2018-03-08 19:08 王清河 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 某城镇进行人口普查,得到了全体居民的生日。现请你写个程序,找出镇上最年长和最年轻的人。 这里确保每个输入的日期都是合法的,但不一定是合理的——假设已知镇上没有超过200岁的老人,而今天是2014年9月6日,所以超过200岁的生日和未出生的生日都是不合理的,应该被过滤掉。 输入格式: 输入在第一行给出 阅读全文
posted @ 2018-03-08 18:49 王清河 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 读入n名学生的姓名、学号、成绩,分别输出成绩最高和成绩最低学生的姓名和学号。 输入格式:每个测试输入包含1个测试用例,格式为 其中姓名和学号均为不超过10个字符的字符串,成绩为0到100之间的一个整数,这里保证在一组测试用例中没有两个学生的成绩是相同的。 输出格式:对每个测试用例输出2行,第1行是成 阅读全文
posted @ 2018-03-08 14:55 王清河 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 每个PAT考生在参加考试时都会被分配两个座位号,一个是试机座位,一个是考试座位。正常情况下,考生在入场时先得到试机座位号码,入座进入试机状态后,系统会显示该考生的考试座位号码,考试时考生需要换到考试座位就座。但有些考生迟到了,试机已经结束,他们只能拿着领到的试机座位号码求助于你,从后台查出他们的考试 阅读全文
posted @ 2018-03-08 14:36 王清河 阅读(105) 评论(0) 推荐(0) 编辑
摘要: This time, you are supposed to find A*B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occu 阅读全文
posted @ 2018-03-08 14:08 王清河 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Given three integers A, B and C in [-263, 263], you are supposed to tell whether A+B > C. Input Specification: The first line of the input gives the p 阅读全文
posted @ 2018-03-08 08:08 王清河 阅读(96) 评论(0) 推荐(0) 编辑
摘要: The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of e 阅读全文
posted @ 2018-03-07 20:35 王清河 阅读(96) 评论(0) 推荐(0) 编辑