自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 资源 (1)
  • 收藏
  • 关注

原创 Pat(Advanced Level)Practice--1099(Build A Binary Search Tree )

Pat1099代码 题目描述: A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only nodes with keys less than the

2015-05-19 20:21:43 1056

原创 Pat(Advanced Level)Practice--1098( Insertion or Heap Sort)

Pat1098代码 题目描述: According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one el

2015-05-19 20:20:06 1260

原创 Pat(Advanced Level)Practice--1097(Deduplication on a Linked List)

Pat1097代码 题目描述: Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each value K, only the first node

2015-05-19 20:17:29 740

原创 Pat(Advanced Level)Practice--1096(Consecutive Factors)

Pat1096代码 题目描述: Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3*5*6*7, where 5, 6, and 7 are the three consecu

2015-05-19 20:13:12 957

原创 Pat(Advanced Level)Practice--1095(Cars on Campus)

Pat1095代码 题目描述: 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 gate. Now with all the info

2015-05-19 20:10:48 1399

原创 Pat(Advanced Level)Practice--1094(The Largest Generation)

Pat1094代码 题目描述: A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to find the generation with the lar

2015-05-19 20:06:25 826

原创 Pat(Advanced Level)Practice--1093(Count PAT's)

Pat1093代码 题目描述: The string APPAPT contains two PAT's as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed by the 3rd, the 4th, and t

2015-05-19 20:04:48 833

原创 Pat(Advanced Level)Practice--1092(To Buy or Not to Buy)

Pat1092代码 题目描述: Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However the owner of

2015-05-19 20:01:40 594

原创 Pat(Basic Level)Practice--1040(有几个PAT)

Pat1040代码 题目描述: 字符串APPAPT中包含了两个单词“PAT”,其中第一个PAT是第2位(P),第4位(A),第6位(T);第二个PAT是第3位(P),第4位(A),第6位(T)。 现给定字符串,问一共可以形成多少个PAT? 输入格式: 输入只有一行,包含一个字符串,长度不超过105,只包含P、A、T三种字母。 输出格式: 在一行中输出给

2015-05-19 19:32:12 904

原创 Pat(Basic Level)Practice--1039(到底买不买)

Pat1039代码 题目描述: 小红想买些珠子做一串自己喜欢的珠串。卖珠子的摊主有很多串五颜六色的珠串,但是不肯把任何一串拆散了卖。于是小红要你帮忙判断一下,某串珠子里是否包含了全部自己想要的珠子?如果是,那么告诉她有多少多余的珠子;如果不是,那么告诉她缺了多少珠子。 为方便起见,我们用[0-9]、[a-z]、[A-Z]范围内的字符来表示颜色。例如在图1中,第3串是小红想做的

2015-05-19 19:29:32 853

原创 Pat(Basic Level)Practice--1038(统计同成绩学生)

Pat1038代码 题目描述: 本题要求读入N名学生的成绩,将获得某一给定分数的学生人数输出。 输入格式: 输入在第1行给出不超过105的正整数N,即学生总人数。随后1行给出N名学生的百分制整数成绩,中间以空格分隔。最后1行给出要查询的分数个数K(不超过N的正整数),随后是K个分数,中间以空格分隔。 输出格式: 在一行中按查询顺序给出得分等于指定分数的学生人

2015-05-19 19:26:14 1108

原创 Pat(Basic Level)Practice--1037(在霍格沃茨找零钱)

Pat1037代码 题目描述: 如果你是哈利·波特迷,你会知道魔法世界有它自己的货币系统 —— 就如海格告诉哈利的:“十七个银西可(Sickle)兑一个加隆(Galleon),二十九个纳特(Knut)兑一个西可,很容易。”现在,给定哈利应付的价钱P和他实付的钱A,你的任务是写一个程序来计算他应该被找的零钱。 输入格式: 输入在1行中分别给出P和A,格式为“Galleon

2015-05-19 19:23:29 1030 2

原创 Pat(Basic Level)Practice--1036(跟奥巴马一起编程)

Pat1036代码 题目描述: 美国总统奥巴马不仅呼吁所有人都学习编程,甚至以身作则编写代码,成为美国历史上首位编写计算机代码的总统。2014年底,为庆祝“计算机科学教育周”正式启动,奥巴马编写了很简单的计算机代码:在屏幕上画一个正方形。现在你也跟他一起画吧! 输入格式: 输入在一行中给出正方形边长N(3 输出格式: 输出由给定字符C画出的正方形。但是注意到

2015-05-19 19:20:05 850

空空如也

空空如也

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

TA关注的人

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