自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

yue123000666的博客

zju本科生

  • 博客(9)
  • 收藏
  • 关注

原创 1025 PAT Ranking (25 分)

Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several places, and the ranklists w...

2019-05-31 15:13:46 137

原创 1031 Hello World for U (20 分)

Given any string of N (≥5) characters, you are asked to form the characters into the shape of U. For example, helloworld can be printed as:h de ll rlowoThat is, the characters must be printed...

2019-04-05 11:23:55 118

原创 7-27 冒泡法排序 (20 分)

将N个整数按从小到大排序的冒泡排序法是这样工作的:从头到尾比较相邻两个元素,如果前面的元素大于其紧随的后面元素,则交换它们。通过一遍扫描,则最后一个元素必定是最大的元素。然后用同样的方法对前N−1个元素进行第二遍扫描。依此类推,最后只需处理两个元素,就完成了对N个数的排序。本题要求对任意给定的K(<N),输出扫描完第K遍后的中间结果数列。输入格式:输入在第1行中给出N和K(1≤K&lt...

2019-04-04 11:55:05 750

原创 7-26 单词长度 (15 分)

7-26 单词长度 (15 分)你的程序要读入一行文本,其中以空格分隔为若干个单词,以.结束。你要输出每个单词的长度。这里的单词与语言无关,可以包括各种符号,比如it’s算一个单词,长度为4。注意,行中可能出现连续的空格;最后的.不计算在内。输入格式:输入在一行中给出一行文本,以.结束提示:用scanf("%c",...);来读入一个字符,直到读到.为止。输出格式:在一行中输出这行文本...

2019-04-04 11:37:26 1013

原创 1005 Spell It Right (20 分)[PAT (Advanced Level) Practice]

1005 Spell It Right (20 分)Given a non-negative integer NNN, your task is to compute the sum of all the digits of NNN, and output every digit of the sum in English.Input Specification:Each input fil...

2018-12-01 16:25:17 147

原创 1004 Counting Leaves (30 分)[PAT (Advanced Level) Practice]

1004 Counting Leaves (30 分)A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.Input Specification:Each input file contains one t...

2018-12-01 16:07:30 166

原创 还原二叉树 [2018秋DS mooc期末]

7-23 还原二叉树 (25 分)给定一棵二叉树的先序遍历序列和中序遍历序列,要求计算该二叉树的高度。输入格式:输入首先给出正整数N(≤50)N(≤50)N(≤50),为树中结点总数。下面两行先后给出先序和中序遍历序列,均是长度为N的不包含重复英文字母(区别大小写)的字符串。输出格式:输出为一个整数,即该二叉树的高度。输入样例:9ABDFGHIECFDHGIBEAC输出样例:...

2018-12-01 15:03:14 207

原创 1002 A+B for Polynomials (25 分)[PAT (Advanced Level) Practice]

1002 A+B for Polynomials (25 分)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 occupies 2 lines, and ...

2018-11-30 21:34:49 125

原创 1001 A+B Format (20 分)[PAT (Advanced Level) Practice]

1001 A+B Format (20 分)Calculate a+b and output the sum in standard format – that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specif...

2018-11-30 21:28:44 169

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

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