<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[geek_jerome的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/geek_jerome</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; geek_jerome]]></copyright><item><title><![CDATA[11]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/89251973</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/89251973</guid><author>geek_jerome</author><pubDate>Fri, 12 Apr 2019 18:52:47 +0800</pubDate><description><![CDATA[]]></description><category></category></item><item><title><![CDATA[数据结构易错知识点总结(持续note)]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/88599413</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/88599413</guid><author>geek_jerome</author><pubDate>Sat, 16 Mar 2019 15:44:07 +0800</pubDate><description><![CDATA[1.二叉排序树查找成功的平均长度为(num11+num22+…numn*n)/numsum；
注意：numi为高度为i时的结点数
2.二叉排序树查找失败的平均长度是(叶子节点高度+1)的总和/叶子节点数;

...]]></description><category></category></item><item><title><![CDATA[算法笔记 - 第六章 - note]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/87311635</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/87311635</guid><author>geek_jerome</author><pubDate>Fri, 15 Feb 2019 01:21:29 +0800</pubDate><description><![CDATA[
STL简单介绍
vector常见用法
vector其实可以简单理解为长度自动变化的数组。
使用vector，需要添加头文件，并且还需要std命名空间
#include&amp;amp;lt;vector&amp;amp;gt;
using namespace std;

//vector的定义
vector&amp;amp;lt;类型&amp;amp;gt; name;
//二维vector定义（区别&amp;amp;gt;&amp;amp;gt;必须隔一个空格）
vetcor&amp;amp;lt;ve]]></description><category></category></item><item><title><![CDATA[PAT B1013题解]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/87129536</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/87129536</guid><author>geek_jerome</author><pubDate>Wed, 13 Feb 2019 00:35:38 +0800</pubDate><description><![CDATA[
1013 数素数 （20 分）
令 P
​i
​​  表示第 i 个素数。现任给两个正整数 M≤N≤10
​4
​​ ，请输出 P
​M
​​  到 P
​N
​​  的所有素数。
输入格式：
输入在一行中给出 M 和 N，其间以空格分隔。
输出格式：
输出从 P
​M
​​  到 P
​N
​​  的所有素数，每 10 个数字占 1 行，其间以空格分隔，但行末不得有多余空格。
输入样例：
5 ...]]></description><category></category></item><item><title><![CDATA[PAT B1007题解]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/87042640</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/87042640</guid><author>geek_jerome</author><pubDate>Tue, 12 Feb 2019 02:15:49 +0800</pubDate><description><![CDATA[
1007 素数对猜想 （20 分）
让我们定义d
​n
​​ 为：d
​n
​​ =p
​n+1
​​ −p
​n
​​ ，其中p
​i
​​ 是第i个素数。显然有d
​1
​​ =1，且对于n&amp;gt;1有d
​n
​​ 是偶数。“素数对猜想”认为“存在无穷多对相邻且差为2的素数”。
现给定任意正整数N(&amp;lt;10
​5
​​ )，请计算不超过N的满足猜想的素数对的个数。
输入格式:
输入在一...]]></description><category></category></item><item><title><![CDATA[PAT B1034/A1088题解]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/87042475</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/87042475</guid><author>geek_jerome</author><pubDate>Tue, 12 Feb 2019 02:13:07 +0800</pubDate><description><![CDATA[
1034 有理数四则运算 （20 分）
本题要求编写程序，计算 2 个有理数的和、差、积、商。
输入格式：
输入在一行中按照 a1/b1 a2/b2 的格式给出两个分数形式的有理数，其中分子和分母全是整型范围内的整数，负号只可能出现在分子前，分母不为 0。
输出格式：
分别在 4 行中按照 有理数1 运算符 有理数2 = 结果 的格式顺序输出 2 个有理数的和、差、积、商。注意输出的每个有理数必...]]></description><category></category></item><item><title><![CDATA[PAT A1081 题解]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/87031444</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/87031444</guid><author>geek_jerome</author><pubDate>Mon, 11 Feb 2019 23:15:48 +0800</pubDate><description><![CDATA[
1081 Rational Sum （20 分）
Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum.
Input Specification:
Each input file contains one test case. Each case st...]]></description><category></category></item><item><title><![CDATA[PAT A1049题解]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/86973734</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/86973734</guid><author>geek_jerome</author><pubDate>Mon, 11 Feb 2019 08:45:19 +0800</pubDate><description><![CDATA[
1049 Counting Ones （30 分）
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 bei...]]></description><category></category></item><item><title><![CDATA[PAT B1049/A1104 题解]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/86940484</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/86940484</guid><author>geek_jerome</author><pubDate>Sun, 10 Feb 2019 23:35:31 +0800</pubDate><description><![CDATA[
1104 Sum of Number Segments （20 分）
Given a sequence of positive numbers, a segment is defined to be a consecutive subsequence. For example, given the sequence { 0.1, 0.2, 0.3, 0.4 }, we have 10 segme...]]></description><category></category></item><item><title><![CDATA[PAT B1019/A1067 题解]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/86930178</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/86930178</guid><author>geek_jerome</author><pubDate>Sun, 10 Feb 2019 20:52:39 +0800</pubDate><description><![CDATA[
1069 The Black Hole of Numbers （20 分）
For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decreasing order...]]></description><category></category></item><item><title><![CDATA[PAT B1003题解]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/86923878</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/86923878</guid><author>geek_jerome</author><pubDate>Sun, 10 Feb 2019 19:18:36 +0800</pubDate><description><![CDATA[
1003 我要通过！ （20 分）
“答案正确”是自动判题系统给出的最令人欢喜的回复。本题属于 PAT 的“答案正确”大派送 —— 只要读入的字符串满足下列条件，系统就输出“答案正确”，否则输出“答案错误”。
得到“答案正确”的条件是：
字符串中必须仅有 P、 A、 T这三种字符，不可以包含其它字符；
任意形如 xPATx 的字符串都可以获得“答案正确”，其中 x 或者是空字符串，或者是仅由字母...]]></description><category></category></item><item><title><![CDATA[PAT B1045/A1101 题解---超时以及格式错误的解决]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/86777822</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/86777822</guid><author>geek_jerome</author><pubDate>Sat, 09 Feb 2019 03:29:12 +0800</pubDate><description><![CDATA[
1101 Quick Sort （25 分）
There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Then the elements less than the p...]]></description><category></category></item><item><title><![CDATA[PAT B1040/A1093题解---解决内存超限测试点的问题]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/86773841</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/86773841</guid><author>geek_jerome</author><pubDate>Fri, 08 Feb 2019 03:17:41 +0800</pubDate><description><![CDATA[
1040 有几个PAT （25 分）
字符串 APPAPT 中包含了两个单词 PAT，其中第一个 PAT 是第 2 位§，第 4 位(A)，第 6 位(T)；第二个 PAT 是第 3 位§，第 4 位(A)，第 6 位(T)。
现给定字符串，问一共可以形成多少个 PAT？
输入格式：
输入只有一行，包含一个字符串，长度不超过10
​5
​​ ，只包含 P、A、T 三种字母。
输出格式：
在一行中...]]></description><category></category></item><item><title><![CDATA[PAT-A1029题解---解决内存超过限制]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/86773696</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/86773696</guid><author>geek_jerome</author><pubDate>Thu, 07 Feb 2019 23:51:33 +0800</pubDate><description><![CDATA[
1029 Median （25 分）
Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1 = { 11, 12, 13, 14 } is 12, and the median of S2 = { 9,...]]></description><category></category></item><item><title><![CDATA[c++ primer - Chap.1 - note]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/86772621</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/86772621</guid><author>geek_jerome</author><pubDate>Thu, 07 Feb 2019 19:33:25 +0800</pubDate><description><![CDATA[好久没有写c++了，除了基本操作之外很多特性和知识都忘了，刚好最近又要用c++做算法，重新复习一哈。

C++简单介绍
C++程序中包含一个或者多个函数，但是其中必须有一个命名为main()，并且main函数的返回类型必须是int。
函数定义包含四个部分：
1.返回类型
2.函数名
3.括号内的形参列表
4.函数体
函数体是以左花括号开始，以右花括号结束的语句块
{
	return 0；
}

r...]]></description><category></category></item><item><title><![CDATA[PAT-A1044题解]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/86769637</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/86769637</guid><author>geek_jerome</author><pubDate>Wed, 06 Feb 2019 21:51:21 +0800</pubDate><description><![CDATA[
1044 Shopping in Mars （25 分）
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 cha...]]></description><category></category></item><item><title><![CDATA[Python Crash Course-note10]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/80003950</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/80003950</guid><author>geek_jerome</author><pubDate>Thu, 19 Apr 2018 13:58:19 +0800</pubDate><description><![CDATA[

测试代码 
python标准库中的模块unittest提供了代码测试工具。 
单元测试用于核实函数的某个方面没有问题。



//name.py
def name(first,last):
        full_name=first+&quot; &quot;+last
        return full_name.title()

//Test.py
import unittest
from hello...]]></description><category></category></item><item><title><![CDATA[Python Crash Course-note9]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/79983218</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/79983218</guid><author>geek_jerome</author><pubDate>Wed, 18 Apr 2018 12:40:59 +0800</pubDate><description><![CDATA[

文件和异常 
读取文件



//digits.txt
3.14159265358979
//reader.py
with open('digits.txt') as file_object:
    contents=file_object.read()
    print(contents)
//OUTPUT
3.14159265358979
/space

后面有一个空格，是因为当rea...]]></description><category></category></item><item><title><![CDATA[Python Crash Course-note8]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/79979072</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/79979072</guid><author>geek_jerome</author><pubDate>Tue, 17 Apr 2018 23:35:23 +0800</pubDate><description><![CDATA[类 
创建类



class Dog():
    def init(self,name,age):
        self.name=name
        self.age=age
    def sit(self):
        print(self.name.title()+&quot; is now sitting.&quot;)
    def roll(self):
        pri...]]></description><category></category></item><item><title><![CDATA[Python Crash Course-note7]]></title><link>https://blog.youkuaiyun.com/geek_jerome/article/details/79955657</link><guid>https://blog.youkuaiyun.com/geek_jerome/article/details/79955657</guid><author>geek_jerome</author><pubDate>Tue, 17 Apr 2018 02:18:25 +0800</pubDate><description><![CDATA[

函数 
定义函数



def greet_user():
    print(&quot;Hello!&quot;)

greet_user()

使用关键字def来定义函数，其后调用函数，将完成打印。

函数参数 
在函数定义括号内添加参数。使用与C++无异。

形参与实参 
调用函数时传用的为实参，函数定义中为形参。

如果有多个参数的情况下，需要对应实参的位置来传递。

参数的默认值 
在编写函数的时候，...]]></description><category></category></item></channel></rss>