ZCMUCZX的博客

学习的脚步

PAT-1023-Have Fun with Numbers

1023. Have Fun with Numbers (20) Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplicat...

2017-02-09 21:17:27

阅读数:244

评论数:0

PAT-1022-Digital Library

1022. Digital Library (30) CHEN, Yue A Digital Library contains millions of books, stored according to their titles, authors, key words of...

2017-01-30 20:26:46

阅读数:204

评论数:0

PAT-甲级-1019

1019. General Palindromic Number (20) A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. ...

2017-01-18 20:56:57

阅读数:207

评论数:0

PAT-甲级-1013

1013. Battle Over Cities (25) It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, al...

2017-01-17 21:18:46

阅读数:233

评论数:0

PAT-甲级-1011

1011. World Cup Betting (20) With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best p...

2017-01-12 22:12:21

阅读数:189

评论数:0

PAT-甲级1009

1009. Product of Polynomials (25) This time, you are supposed to find A*B where A and B are two polynomials. Input Specification: Each input file...

2017-01-09 23:26:35

阅读数:180

评论数:0

PAT-甲级-1007

1007. Maximum Subsequence Sum (25) Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., ...

2017-01-08 22:10:24

阅读数:184

评论数:0

PAT-甲级-1006

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 las...

2017-01-07 07:56:19

阅读数:224

评论数:0

PAT-甲级-1004

1004. Counting Leaves (30) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue A family hierarchy is usually...

2017-01-07 07:38:17

阅读数:304

评论数:0

PAT-甲级-1002

1002. A+B for Polynomials (25) This time, you are supposed to find A+B where A and B are two polynomials. Input Each input file contains one test...

2016-12-31 09:02:18

阅读数:632

评论数:0

PAT-乙级-1058

1058. 选择题(20) 批改多选题是比较麻烦的事情,本题就请你写个程序帮助老师批改多选题,并且指出哪道题错的人最多。 输入格式: 输入在第一行给出两个正整数N( 输出格式: 按照输入的顺序给出每个学生的得分,每个分数占一行。注意判题时只有选择全部正确才能得到该题的分数。最后一行输出...

2016-12-29 12:37:11

阅读数:524

评论数:0

PAT-乙级-1052

1052. 卖个萌 (20) 萌萌哒表情符号通常由“手”、“眼”、“口”三个主要部分组成。简单起见,我们假设一个表情符号是按下列格式输出的: [左手]([左眼][口][右眼])[右手] 现给出可选用的符号集合,请你按用户的要求输出表情。 输入格式: 输入首先在前三行...

2016-12-29 12:15:08

阅读数:229

评论数:0

PAT-乙级-1060

1060. 爱丁顿数(25) 英国天文学家爱丁顿很喜欢骑车。据说他为了炫耀自己的骑车功力,还定义了一个“爱丁顿数”E,即满足有E天骑车超过E英里的最大整数E。据说爱丁顿自己的E等于87。 现给定某人N天的骑车距离,请你算出对应的爱丁顿数E( 输入格式: 输入第一行给出一...

2016-12-29 09:50:54

阅读数:487

评论数:0

PAT-乙级-1054

1054. 求平均值 (20) 本题的基本要求非常简单:给定N个实数,计算它们的平均值。但复杂的是有些输入数据可能是非法的。一个“合法”的输入是[-1000,1000]区间内的实数,并且最多精确到小数点后2位。当你计算平均值的时候,不能把那些非法的数据算在内。 输入格式: 输入第一行给出正...

2016-12-29 09:39:45

阅读数:176

评论数:0

PAT-乙级-1015

1015. 德才论 (25) 宋代史学家司马光在《资治通鉴》中有一段著名的“德才论”:“是故才德全尽谓之圣人,才德兼亡谓之愚人,德胜才谓之君子,才胜德谓之小人。凡取人之术,苟不得圣人,君子而与之,与其得小人,不若得愚人。” 现给出一批考生的德才分数,请根据司马光的理论给出录取排名。...

2016-12-29 09:26:53

阅读数:343

评论数:0

PAT-乙级-1025

1025. 反转链表 (25) 给定一个常数K以及一个单链表L,请编写程序将L中每K个结点反转。例如:给定L为1→2→3→4→5→6,K为3,则输出应该为3→2→1→6→5→4;如果K为4,则输出应该为4→3→2→1→5→6,即最后不到K个元素不反转。 输入格式: 每个输入包...

2016-12-29 09:20:56

阅读数:180

评论数:0

PAT-乙级-1013

1013. 数素数 (20) 令Pi表示第i个素数。现任给两个正整数M 4,请输出PM到PN的所有素数。 输入格式: 输入在一行中给出M和N,其间以空格分隔。 输出格式: 输出从PM到PN的所有素数,每10个数字占1行,其间以空格分隔,但行末不得有多余空格。 输入样例: 5 27 输...

2016-12-29 08:39:50

阅读数:243

评论数:0

PAT—甲级-1086

1086. Tree Traversals Again (25) An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that...

2016-12-28 20:29:58

阅读数:204

评论数:0

PAT 甲级 1114

1114. Family Property (25) This time, you are supposed to help us collect the data for family-owned property. Given each person's family members, a...

2016-12-27 18:13:46

阅读数:203

评论数:0

PAT 甲级 1103

1113. Integer Set Partition (25) Given a set of N (> 1) positive integers, you are supposed to partition them into two disjoint sets A1 and A2 o...

2016-12-27 11:48:38

阅读数:415

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭