<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[R11happy的博客]]></title><description><![CDATA[春风十里、五十里、一百里、体测一千米，木瓜炖雪梨、芝士玉米粒、鸡汁土豆泥，不如你，全都不如你~]]></description><link>https://blog.youkuaiyun.com/R11happy</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; R11happy]]></copyright><item><title><![CDATA[PAT甲级.1125. Chain the Ropes (25)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/61241069</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/61241069</guid><author>R11happy</author><pubDate>Sat, 11 Mar 2017 00:07:40 +0800</pubDate><description><![CDATA[题意
Given some segments of rope, you are supposed to chain them into one rope. Each time you may only fold two segments into loops and chain them into one piece, as shown by the figure. The resulting ch]]></description><category></category></item><item><title><![CDATA[PAT甲级1098. Insertion or Heap Sort (25)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/61239121</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/61239121</guid><author>R11happy</author><pubDate>Sat, 11 Mar 2017 00:00:25 +0800</pubDate><description><![CDATA[题目
According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element from the input data,]]></description><category></category></item><item><title><![CDATA[1059. Prime Factors (25).md]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/57215973</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/57215973</guid><author>R11happy</author><pubDate>Sun, 26 Feb 2017 00:35:43 +0800</pubDate><description><![CDATA[题意
Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1^k1 * p2^k2 *…*pm^km
  输入格式
Each input file contains one test case which gives a p]]></description><category></category></item><item><title><![CDATA[PAT甲级.1049. Counting Ones (30)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/55805017</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/55805017</guid><author>R11happy</author><pubDate>Sun, 19 Feb 2017 15:34:53 +0800</pubDate><description><![CDATA[题意
The task is simple: given any positive integer N, you are supposed to count the total number of 1’s in the decimal form of the integers from 1 to N. For example, given N being 12, there are five 1’s]]></description><category></category></item><item><title><![CDATA[PAT甲级.1096. Consecutive Factors (20)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/55804904</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/55804904</guid><author>R11happy</author><pubDate>Sun, 19 Feb 2017 15:24:45 +0800</pubDate><description><![CDATA[题意
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 consecutive numbers. Now give]]></description><category></category></item><item><title><![CDATA[PAT甲级.1044. Shopping in Mars (25)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/55143985</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/55143985</guid><author>R11happy</author><pubDate>Wed, 15 Feb 2017 00:23:29 +0800</pubDate><description><![CDATA[题意
Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M). When making the payment, the chain can be cut at any position]]></description><category></category></item><item><title><![CDATA[PAT甲级.1067. Sort with Swap(0,*) (25)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/55070315</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/55070315</guid><author>R11happy</author><pubDate>Tue, 14 Feb 2017 01:16:34 +0800</pubDate><description><![CDATA[题意
Given any permutation of the numbers {0, 1, 2,…, N-1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation that is allowed to use? For example, to sort {4, 0, 2]]></description><category></category></item><item><title><![CDATA[PAT甲级.1075. PAT Judge (25)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/55012089</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/55012089</guid><author>R11happy</author><pubDate>Mon, 13 Feb 2017 00:00:42 +0800</pubDate><description><![CDATA[题意
The ranklist of PAT is generated from the status list, which shows the scores of the submittions. This time you are supposed to generate the ranklist for PAT.
  输入格式
Each input file contains one tes]]></description><category></category></item><item><title><![CDATA[PAT甲级.1033. To Fill or Not to Fill (25)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/55006989</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/55006989</guid><author>R11happy</author><pubDate>Sun, 12 Feb 2017 22:42:16 +0800</pubDate><description><![CDATA[题目
With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations on the way from time to time. Different]]></description><category></category></item><item><title><![CDATA[PAT甲级.1083. List Grades (25)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/54934083</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/54934083</guid><author>R11happy</author><pubDate>Wed, 08 Feb 2017 22:45:10 +0800</pubDate><description><![CDATA[题目
Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grade]]></description><category></category></item><item><title><![CDATA[PAT甲级.1012. The Best Rank (25)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/54933865</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/54933865</guid><author>R11happy</author><pubDate>Wed, 08 Feb 2017 22:17:48 +0800</pubDate><description><![CDATA[题目
To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algebra), and E - E]]></description><category></category></item><item><title><![CDATA[PAT甲级.1025. PAT Ranking (25)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/54898405</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/54898405</guid><author>R11happy</author><pubDate>Mon, 06 Feb 2017 23:24:41 +0800</pubDate><description><![CDATA[题目
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]]></description><category></category></item><item><title><![CDATA[PAT甲级.1064. Complete Binary Search Tree (30)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/52900736</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/52900736</guid><author>R11happy</author><pubDate>Sun, 23 Oct 2016 11:34:49 +0800</pubDate><description><![CDATA[题目 
  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 node’s key. 
The righ]]></description><category></category></item><item><title><![CDATA[PAT甲级.1086. Tree Traversals Again (25)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/52900522</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/52900522</guid><author>R11happy</author><pubDate>Sun, 23 Oct 2016 10:58:45 +0800</pubDate><description><![CDATA[题目
An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered from 1 to 6) is traversed, the st]]></description><category></category></item><item><title><![CDATA[PAT甲级.1020. Tree Traversals (25)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/52900463</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/52900463</guid><author>R11happy</author><pubDate>Sun, 23 Oct 2016 10:48:14 +0800</pubDate><description><![CDATA[题目
Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the c]]></description><category></category></item><item><title><![CDATA[PAT乙级.1017. A除以B (20)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/52592973</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/52592973</guid><author>R11happy</author><pubDate>Tue, 20 Sep 2016 09:47:46 +0800</pubDate><description><![CDATA[题目
本题要求计算A/B，其中A是不超过1000位的正整数，B是1位正整数。你需要输出商数Q和余数R，使得A = B * Q + R成立。
  输入格式
输入在1行中依次给出A和B，中间以1空格分隔。
  输出格式
在1行中依次输出Q和R，中间以1空格分隔。
  输入样例
123456789050987654321 7
  输出样例
17636684150141093474 3PAT链接思路数据结构]]></description><category></category></item><item><title><![CDATA[PAT乙级.1013. 数素数 (20)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/52592942</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/52592942</guid><author>R11happy</author><pubDate>Tue, 20 Sep 2016 09:44:09 +0800</pubDate><description><![CDATA[1013. 数素数 (20)
  题目
令Pi表示第i个素数。现任给两个正整数M <= N <= 104，请输出PM到PN的所有素数。
  输入格式
输入在一行中给出M和N，其间以空格分隔。
  输出格式
输出从PM到PN的所有素数，每10个数字占1行，其间以空格分隔，但行末不得有多余空格。
  输入样例
5 27
  输出样例
11 13 17 19 23 29 31 37 41 43 
47 5]]></description><category></category></item><item><title><![CDATA[PAT乙级.1034. 有理数四则运算(20)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/52592906</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/52592906</guid><author>R11happy</author><pubDate>Tue, 20 Sep 2016 09:40:05 +0800</pubDate><description><![CDATA[1034. 有理数四则运算(20)
  题目
本题要求编写程序，计算2个有理数的和、差、积、商。
  输入格式
输入在一行中按照“a1/b1 a2/b2”的格式给出两个分数形式的有理数，其中分子和分母全是整型范围内的整数，负号只可能出现在分子前，分母不为0。
  输出格式
分别在4行中按照“有理数1 运算符 有理数2 = 结果”的格式顺序输出2个有理数的和、差、积、商。注意输出的每个有理数必须是该有]]></description><category></category></item><item><title><![CDATA[PAT乙级.1049. 数列的片段和(20)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/52592843</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/52592843</guid><author>R11happy</author><pubDate>Tue, 20 Sep 2016 09:34:02 +0800</pubDate><description><![CDATA[1049. 数列的片段和(20)
  题目
给定一个正数数列，我们可以从中截取任意的连续的几个数，称为片段。例如，给定数列{0.1, 0.2, 0.3, 0.4}，我们有(0.1) (0.1, 0.2) (0.1, 0.2, 0.3) (0.1, 0.2, 0.3, 0.4) (0.2) (0.2, 0.3) (0.2, 0.3, 0.4) (0.3) (0.3, 0.4) (0.4) 这10个片段]]></description><category></category></item><item><title><![CDATA[PAT乙级.1019. 数字黑洞 (20)]]></title><link>https://blog.youkuaiyun.com/R11happy/article/details/52590886</link><guid>https://blog.youkuaiyun.com/R11happy/article/details/52590886</guid><author>R11happy</author><pubDate>Tue, 20 Sep 2016 00:18:07 +0800</pubDate><description><![CDATA[1019. 数字黑洞 (20)
  题目
给定任一个各位数字不完全相同的4位正整数，如果我们先把4个数字按非递增排序，再按非递减排序，然后用第1个数字减第2个数字，将得到一个新的数字。一直重复这样做，我们很快会停在有“数字黑洞”之称的6174，这个神奇的数字也叫Kaprekar常数。例如，我们从6767开始，将得到7766 - 6677 = 1089 
9810 - 0189 = 9621 
962]]></description><category></category></item></channel></rss>