<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[我要加油了，因为我还有很多NB的梦想！]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Codeblocksm</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Codeblocksm]]></copyright><item><title><![CDATA[162. Find Peak Element]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/75270594</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/75270594</guid><author>Codeblocksm</author><pubDate>Tue, 18 Jul 2017 09:17:20 +0800</pubDate><description><![CDATA[162. Find Peak ElementA peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multip]]></description><category></category></item><item><title><![CDATA[LeetCode 119. Pascal's Triangle II]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/71635702</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/71635702</guid><author>Codeblocksm</author><pubDate>Thu, 11 May 2017 15:46:46 +0800</pubDate><description><![CDATA[119. Pascal’s Triangle II
  Given an index k, return the kth row of the Pascal’s triangle.
class Solution {
public:
    vector<int> getRow(int rowIndex) {
         vector<int> ANS;
         ANS.push_ba]]></description><category></category></item><item><title><![CDATA[LeeCode 242. Valid Anagram]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/71633953</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/71633953</guid><author>Codeblocksm</author><pubDate>Thu, 11 May 2017 15:32:26 +0800</pubDate><description><![CDATA[242. Valid Anagram
  Given two strings s and t, write a function to determine if t is an anagram of s.
  
  For example, s = “anagram”, t = “nagaram”, return true. s = “rat”, t = “car”, return false.
c]]></description><category></category></item><item><title><![CDATA[LeetCode 278. First Bad Version]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/71171411</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/71171411</guid><author>Codeblocksm</author><pubDate>Thu, 04 May 2017 15:54:24 +0800</pubDate><description><![CDATA[278. First Bad Version
  You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails 
   the quality check. Since each versi]]></description><category></category></item><item><title><![CDATA[LeetCode 210  Course Schedule II]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/71170497</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/71170497</guid><author>Codeblocksm</author><pubDate>Thu, 04 May 2017 14:50:22 +0800</pubDate><description><![CDATA[210. Course Schedule II
  There are a total of n courses you have to take, labeled from 0 to n - 1.
  
  Some courses may have prerequisites, for example to take course 0 you have to first take course]]></description><category></category></item><item><title><![CDATA[LeetCode 474  Ones and Zeroes]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/71169842</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/71169842</guid><author>Codeblocksm</author><pubDate>Thu, 04 May 2017 13:58:46 +0800</pubDate><description><![CDATA[474. Ones and Zeroes
  In the computer world, use restricted resource you have to generate maximum benefit is what we always want to pursue.
  
  For now, suppose you are a dominator of m 0s and n 1s r]]></description><category></category></item><item><title><![CDATA[LeetCode 150 Evaluate Reverse Polish Notation]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/71168335</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/71168335</guid><author>Codeblocksm</author><pubDate>Thu, 04 May 2017 13:09:10 +0800</pubDate><description><![CDATA[150. Evaluate Reverse Polish Notation
  Evaluate the value of an arithmetic expression in Reverse Polish 
  Notation.
  
  Valid operators are +, -, *, /. Each operand may be an integer or 
  another e]]></description><category></category></item><item><title><![CDATA[LeetCode 168 Excel Sheet Column Title]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/71164996</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/71164996</guid><author>Codeblocksm</author><pubDate>Thu, 04 May 2017 12:37:33 +0800</pubDate><description><![CDATA[168. Excel Sheet Column Title
  Given a positive integer, return its corresponding column title as 
  appear in an Excel sheet.
  
  For example:1 -> A
2 -> B
3 -> C
...
26 -> Z
27 -> AA
28 -> AB难度EASY]]></description><category></category></item><item><title><![CDATA[LeetCode 290 Word Pattern]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/71156756</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/71156756</guid><author>Codeblocksm</author><pubDate>Wed, 03 May 2017 23:53:35 +0800</pubDate><description><![CDATA[Word Pattern
  Given a pattern and a string str, find if str follows the same pattern.
  
  Here follow means a full match, such that there is a bijection between 
  a letter in pattern and a non-empty]]></description><category></category></item><item><title><![CDATA[LeetCode  121  Best Time to Buy and Sell Stock]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/71105296</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/71105296</guid><author>Codeblocksm</author><pubDate>Tue, 02 May 2017 23:32:57 +0800</pubDate><description><![CDATA[Best Time to Buy and Sell Stock
  Say you have an array for which the ith element is the price of a 
  given stock on day i.
  
  If you were only permitted to complete at most one transaction (ie,]]></description><category></category></item><item><title><![CDATA[4385: [POI2015]Wilcze doły （单调队列）]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/52506780</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/52506780</guid><author>Codeblocksm</author><pubDate>Sun, 11 Sep 2016 21:54:24 +0800</pubDate><description><![CDATA[http://www.lydsy.com/JudgeOnline/problem.php?id=4385Description给定一个长度为n的序列，你有一次机会选中一段连续的长度不超过d的区间，将里面所有数字全部修改为0。 
请找到最长的一段连续区间，使得该区间内所有数字之和不超过p。Input第一行包含三个整数n,p,d(1<=d<=n<=2000000，0<=p<=10^16)。 
第二行包含]]></description><category></category></item><item><title><![CDATA[HDU 3415 Max Sum of Max-K-sub-sequence（求长度不超过K的最大区间和）]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/52504719</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/52504719</guid><author>Codeblocksm</author><pubDate>Sun, 11 Sep 2016 17:00:54 +0800</pubDate><description><![CDATA[http://acm.hdu.edu.cn/showproblem.php?pid=3415Problem Description 
Given a circle sequence A[1],A[2],A[3]……A[n]. Circle sequence means the left neighbour of A[1] is A[n] , and the right neighbour of A[]]></description><category></category></item><item><title><![CDATA[2013-2014 Northwestern European Regional Contest (NWERC 2013)]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/52440481</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/52440481</guid><author>Codeblocksm</author><pubDate>Wed, 07 Sep 2016 21:31:08 +0800</pubDate><description><![CDATA[http://codeforces.com/gym/100405/

补题：

A

已知一个图的点数为n，且改图为连通图。告诉了每两个点之间的最短路的距离。让你构造这个图，且这个图的边数为n。

Idea 1： 
删边法。时间接近于O（n^3 ）。根据题目中给的矩阵构造一个完全图，然后遍历每条边，看是否需这条边是多余的。如果某条边的两点间的最短路可以由其他点到达，那么这条边就是多余的，可删除。因]]></description><category></category></item><item><title><![CDATA[2743: [HEOI2012]采花 （求区间内出现至少出现两次的数的个数）]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/52411928</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/52411928</guid><author>Codeblocksm</author><pubDate>Fri, 02 Sep 2016 10:49:47 +0800</pubDate><description><![CDATA[http://www.lydsy.com/JudgeOnline/problem.php?id=2743Description萧芸斓是Z国的公主，平时的一大爱好是采花。 
今天天气晴朗，阳光明媚，公主清晨便去了皇宫中新建的花园采花。花园足够大，容纳了n朵花，花有c种颜色（用整数1-c表示），且花是排成一排的，以便于公主采花。公主每次采花后会统计采到的花的颜色数，颜色数越多她会越高兴！同时，她有一癖好]]></description><category></category></item><item><title><![CDATA[Codeforces 709B Checkpoints  ( 模拟)]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/52326990</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/52326990</guid><author>Codeblocksm</author><pubDate>Fri, 26 Aug 2016 11:46:12 +0800</pubDate><description><![CDATA[http://codeforces.com/problemset/problem/709/BB. CheckpointsVasya takes part in the orienteering competition. There are n checkpoints located along the line at coordinates x1, x2, …, xn. Vasya starts a]]></description><category></category></item><item><title><![CDATA[Codeforces 703D Mishka and Interesting sum （树状数组求区间内不同的数的异或和）]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/52232401</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/52232401</guid><author>Codeblocksm</author><pubDate>Thu, 18 Aug 2016 23:03:33 +0800</pubDate><description><![CDATA[http://www.codeforces.com/contest/703/problem/D

Little Mishka enjoys programming. Since her birthday has just passed, her friends decided to present her with array of non-negative integers a1, a2, …,]]></description><category></category></item><item><title><![CDATA[Codeforces 705C Thor （模拟）]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/52230380</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/52230380</guid><author>Codeblocksm</author><pubDate>Wed, 17 Aug 2016 14:03:45 +0800</pubDate><description><![CDATA[http://www.codeforces.com/contest/705/problem/CThor is getting used to the Earth. As a gift Loki gave him a smartphone. There are n applications on this phone. Thor is fascinated by this phone. He has]]></description><category></category></item><item><title><![CDATA[HDU 5835 Danganronpa（贪心）]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/52212891</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/52212891</guid><author>Codeblocksm</author><pubDate>Mon, 15 Aug 2016 17:12:35 +0800</pubDate><description><![CDATA[http://acm.hdu.edu.cn/showproblem.php?pid=5835Problem Description 
Chisa Yukizome works as a teacher in the school. She prepares many gifts, which consist of n kinds with a[i] quantities of each kind,]]></description><category></category></item><item><title><![CDATA[HDU  5821 Ball ( 贪心）]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/52191432</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/52191432</guid><author>Codeblocksm</author><pubDate>Fri, 12 Aug 2016 14:36:10 +0800</pubDate><description><![CDATA[http://acm.hdu.edu.cn/showproblem.php?pid=5821Problem DescriptionZZX has a sequence of boxes numbered 1,2,…,n. Each box can contain at most one ball.You are given the initial configuration of the balls]]></description><category></category></item><item><title><![CDATA[POJ 2823 Sliding Window（单调队列模板题）]]></title><link>https://blog.youkuaiyun.com/Codeblocksm/article/details/52136627</link><guid>https://blog.youkuaiyun.com/Codeblocksm/article/details/52136627</guid><author>Codeblocksm</author><pubDate>Sat, 06 Aug 2016 15:37:39 +0800</pubDate><description><![CDATA[http://poj.org/problem?id=2823Sliding WindowDescriptionAn array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. Y]]></description><category></category></item></channel></rss>