自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 收藏
  • 关注

原创 1151 LCA in a Binary Tree (30 分)

1151LCA in a Binary Tree(30 分)The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants.Given any two nodes in a binary tree, you a...

2019-02-27 21:28:09 190

原创 1155 Heap Paths (30 分)

1155 Heap Paths (30 分)In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either gre...

2019-02-26 16:43:21 128

原创 1030 Travel Plan (30 分)

题目:A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a program to help a traveler to decide the shortest pat...

2019-02-26 13:05:42 243

原创 PAT 甲级 1022 Digital Library (30 分)

1022 Digital Library (30 分)A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assign...

2019-02-25 16:12:46 150

转载 C++ fill和fill_n函数用法介绍和比较

C++ fill和fill_n函数用法介绍和比较(转自https://blog.csdn.net/monkeyduck/article/details/44536371,侵删)fillfill函数的作用是:将一个区间的元素都赋予val值。函数参数:fill(first,last,val);//first为容器的首迭代器,last为容器的末迭代器,val为将要替换的值。例题:给你n个...

2019-02-24 20:59:37 360

原创 1018 Public Bike Management (30 分)

There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any station and return it to any other stations in the ...

2019-02-24 20:47:57 181

原创 1014 Waiting in Line (30 分)

1014 Waiting in Line (30 分)Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to...

2019-02-23 14:48:32 192

原创 1013 Battle Over Cities (25 分)

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, all the highways from/toward that city are closed. We...

2019-02-22 18:12:09 211

原创 PAT 甲级 1010 Radix (25 分)

1010 Radix (25 分)Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 is a binary number.Now for any pa...

2019-02-22 13:13:05 216

转载 cctype和climits的用法

cctype和climits的用法(转自https://blog.csdn.net/essencelite/article/details/11820633,侵删) 一、 cctype中通常包括一些常用函数的判断,如某个字符是否为大写,用isupper()如果参数是大写字母,函数返回true, 还有像isalnum(),如果参数是字母数字,即字母或者数字,函数返回true.下面我们通过一个...

2019-02-21 19:53:11 156

转载 1009 Product of Polynomials (25 分)

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 contains one test case. Each case occupies 2 lines...

2019-02-21 18:58:23 498

原创 PAT 甲级 1008 Elevator (20 分)

1008 Elevator (20 分)The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified...

2019-02-21 13:14:15 234

原创 PAT甲级 1007 Maximum Subsequence Sum (25 分)

1007 Maximum Subsequence Sum (25 分)Given a sequence of K integers { N​1​​, N​2​​, ..., N​K​​ }. A continuous subsequence is defined to be { N​i​​, N​i+1​​, ..., N​j​​ } where 1≤i≤j≤K. The Maximum Su...

2019-02-18 19:17:55 216

原创 PAT 甲级 1006 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 reco...

2019-02-18 15:23:31 155

原创 PAT甲级 1005 Spell It Right (20 分)

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

2019-02-18 13:33:07 209

原创 PAT甲级 1004 Counting Leaves (30 分)

 1004 Counting Leaves (30 分)1004 数叶子 (30分)A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.家族层次结构通常由系谱树表示,你的任务是数出哪些家族成员没有...

2019-02-17 00:24:17 152

转载 PAT 1003 Emergency (25 分)

1003 Emergency (25 分)As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams...

2019-02-16 17:37:28 524

空空如也

空空如也

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

TA关注的人

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