<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Wayne_Mai的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Wayne_Mai</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Wayne_Mai]]></copyright><item><title><![CDATA[Little Pony and Summer Sun Celebration CodeForces #453C 题解[C++]]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80959882</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80959882</guid><author>Wayne_Mai</author><pubDate>Sun, 08 Jul 2018 15:51:49 +0800</pubDate><description><![CDATA[题目来源



http://codeforces.com/contest/453/problem/C

题意理解



Twilight Sparkle wanted to track the path of Nightmare Moon. Unfortunately, she didn’t know the exact path. What she knew is the parity of ...]]></description><category></category></item><item><title><![CDATA[Preparing Olympiad CodeForces #550B 题解[C++]]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80953385</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80953385</guid><author>Wayne_Mai</author><pubDate>Sat, 07 Jul 2018 17:48:03 +0800</pubDate><description><![CDATA[题目来源



http://codeforces.com/problemset/problem/550/B

题意理解



You have n problems. You have estimated the difficulty of the i-th one as integer ci. Now you want to prepare a problemset for a contest...]]></description><category></category></item><item><title><![CDATA[Anscombe's quartet]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80664694</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80664694</guid><author>Wayne_Mai</author><pubDate>Tue, 12 Jun 2018 14:15:57 +0800</pubDate><description><![CDATA[Part 1

For each of the four datasets…

Compute the mean and variance of both x and y 
Compute the correlation coefficient between x and y 
Compute the linear regression line: y=β0+β1x+ϵ (hint: use st...]]></description><category></category></item><item><title><![CDATA[Scipy库的一些应用]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80548049</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80548049</guid><author>Wayne_Mai</author><pubDate>Sat, 02 Jun 2018 14:56:52 +0800</pubDate><description><![CDATA[ 


Exercise 10.1



对于最小二乘法, 因为Scipy中对应的实现是基于假定: Data=m*(n+1)来的, 也就是说我们需要附加一列全为 1 的列到原始数据中. 这样一来, 我们就可以省略截距. 具体证明过程可以看这里: 
 正规方程.

代码实现如下:



&quot;&quot;&quot;Exercise 10.1: Least squares
Generate matrix A 2 Rm×n ...]]></description><category></category></item><item><title><![CDATA[Jamie and Interesting Graph CodeForces #916C[题解]]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80541967</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80541967</guid><author>Wayne_Mai</author><pubDate>Fri, 01 Jun 2018 19:24:57 +0800</pubDate><description><![CDATA[题目来源



http://codeforces.com/contest/916/problem/C

题意理解



Jamie has recently found undirected weighted graphs with the following properties very interesting:

The graph is connected and contains ex...]]></description><category></category></item><item><title><![CDATA[Liebig's Barrels CodeForces #985C 题解[C++]]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80536465</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80536465</guid><author>Wayne_Mai</author><pubDate>Fri, 01 Jun 2018 13:33:55 +0800</pubDate><description><![CDATA[题目来源



http://codeforces.com/contest/985/problem/C

题意分析



You have m = n·k wooden staves. The i-th stave has length ai. You have to assemble n barrels consisting of k staves each, you can use any k...]]></description><category></category></item><item><title><![CDATA[Shortest Path of the King CodeForces #3A 题解[C++]]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80506808</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80506808</guid><author>Wayne_Mai</author><pubDate>Wed, 30 May 2018 10:47:27 +0800</pubDate><description><![CDATA[题目来源



http://codeforces.com/contest/3/problem/A

题意解析



The king is left alone on the chessboard. In spite of this loneliness, he doesn’t lose heart, because he has business of national importance....]]></description><category></category></item><item><title><![CDATA[Two Buttons CodeForces  #520B 题解[C++]]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80504131</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80504131</guid><author>Wayne_Mai</author><pubDate>Wed, 30 May 2018 00:28:03 +0800</pubDate><description><![CDATA[题目来源



http://codeforces.com/contest/520/problem/B

题目描述



Vasya has found a strange device. On the front panel of a device there are: a red button, a blue button and a display showing some positive...]]></description><category></category></item><item><title><![CDATA[Matplotlib绘制高斯核概率分布(Gaussian kernel density estimator)等实战]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80465478</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80465478</guid><author>Wayne_Mai</author><pubDate>Sat, 26 May 2018 22:03:15 +0800</pubDate><description><![CDATA[

Exercise 11.1



这个十分简单, plot霸王硬上弓即可.



&quot;&quot;&quot;Exercise 11.1: Plotting a function
Plot the function
f(x) = sin2(x − 2)e−x2
over the interval [0; 2]. Add proper axis labels, a title, etc.&quot;&quot;&quot;

import mat...]]></description><category></category></item><item><title><![CDATA[Numpy的一些矩阵运算实例]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80413625</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80413625</guid><author>Wayne_Mai</author><pubDate>Tue, 22 May 2018 23:29:41 +0800</pubDate><description><![CDATA[题目如下





代码实现



前三题的代码如下:



import numpy as np
from scipy.linalg import toeplitz
from scipy.sparse.linalg import svds

# Generate matrices A, with random Gaussian entries, B, a Toeplitz matrix, whe...]]></description><category></category></item><item><title><![CDATA[线性回归及Python实现实例]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80387459</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80387459</guid><author>Wayne_Mai</author><pubDate>Mon, 21 May 2018 06:30:23 +0800</pubDate><description><![CDATA[线性回归模型



常常遇到这样的问题, 我们要进行线性回归的自变量 xxx 不是一个单独的值, 而是一个RnRnR^n 的向量. 这种情况即是多元线性回归.

我们的目的就不再是寻找单独的值kkk和bbb来满足一次方程, 而是寻找到在RnRnR^n的向量www和标量bbb使得: 
y′=wTxi+by′=wTxi+by'=w^Tx_i+b 
其中y′y′y'’即是回归方程的预测值. 那么, 要求...]]></description><category></category></item><item><title><![CDATA[Best Time to Buy and Sell Stock Leetcode #121 题解[Python]]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80291535</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80291535</guid><author>Wayne_Mai</author><pubDate>Sat, 12 May 2018 14:59:10 +0800</pubDate><description><![CDATA[题目来源



https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/

题目描述



Say you have an array for which the ith element is the price of a given stock on day i.

If you were only pe...]]></description><category></category></item><item><title><![CDATA[Maximum Depth of Binary Tree Leetcode #104 题解[Python]]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80291368</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80291368</guid><author>Wayne_Mai</author><pubDate>Sat, 12 May 2018 14:43:30 +0800</pubDate><description><![CDATA[题目来源



https://leetcode.com/problems/maximum-depth-of-binary-tree/description/

题意分析



Given a binary tree, find its maximum depth.

The maximum depth is the number of nodes along the longest path f...]]></description><category></category></item><item><title><![CDATA[Count Primes Leetcode #204 题解[Python]]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80291300</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80291300</guid><author>Wayne_Mai</author><pubDate>Sat, 12 May 2018 14:35:35 +0800</pubDate><description><![CDATA[题目来源



https://leetcode.com/problems/count-primes/description/

题目描述



Count the number of prime numbers less than a non-negative number, n.

Example:


  Input: 10 
  Output: 4 
  Explanation: Ther...]]></description><category></category></item><item><title><![CDATA[Number of Atoms Leetcode #726 题解[C++]]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80291104</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80291104</guid><author>Wayne_Mai</author><pubDate>Sat, 12 May 2018 14:11:18 +0800</pubDate><description><![CDATA[题目来源



https://leetcode.com/problems/number-of-atoms/description/

题意分析



Given a chemical formula (given as a string), return the count of each atom.

An atomic element always starts with an upperc...]]></description><category></category></item><item><title><![CDATA[Maximum Gap Leetcode #164 题解[Python]]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80290708</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80290708</guid><author>Wayne_Mai</author><pubDate>Sat, 12 May 2018 13:21:18 +0800</pubDate><description><![CDATA[题目来源



https://leetcode.com/problems/maximum-gap/description/

题意分析



Given an unsorted array, find the maximum difference between the successive elements in its sorted form.

Return 0 if the array ...]]></description><category></category></item><item><title><![CDATA[Sort Colors Leetcode #75 题解[C++]]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80290540</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80290540</guid><author>Wayne_Mai</author><pubDate>Sat, 12 May 2018 12:57:17 +0800</pubDate><description><![CDATA[题目来源



https://leetcode.com/problems/sort-colors/description/

题目描述



Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, wit...]]></description><category></category></item><item><title><![CDATA[Search a 2D Matrix Leetcode #74 题解[Python]]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80290446</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80290446</guid><author>Wayne_Mai</author><pubDate>Sat, 12 May 2018 12:37:40 +0800</pubDate><description><![CDATA[题目来源



https://leetcode.com/problems/search-a-2d-matrix/description/

题目描述



Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:

Int...]]></description><category></category></item><item><title><![CDATA[Insert Interval Leetcode #57 题解[Python]]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80289874</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80289874</guid><author>Wayne_Mai</author><pubDate>Sat, 12 May 2018 11:21:45 +0800</pubDate><description><![CDATA[题目来源



https://leetcode.com/problems/insert-interval/description/

题目描述



Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).

You may assume tha...]]></description><category></category></item><item><title><![CDATA[Maximum Subarray Leetcode #53 题解[Python]]]></title><link>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80289717</link><guid>https://blog.youkuaiyun.com/Wayne_Mai/article/details/80289717</guid><author>Wayne_Mai</author><pubDate>Sat, 12 May 2018 11:06:25 +0800</pubDate><description><![CDATA[题目来源



https://leetcode.com/problems/maximum-subarray/description/

题目描述



Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and re...]]></description><category></category></item></channel></rss>