<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Code_J_xer的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Code_J_xer</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Code_J_xer]]></copyright><item><title><![CDATA[文章标题]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/52195790</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/52195790</guid><author>Code_J_xer</author><pubDate>Fri, 12 Aug 2016 22:13:00 +0800</pubDate><description><![CDATA[=============================以下是最小生成树+并查集======================================  
【HDU】  
1213        How Many Tables         基础并查集★  
1272        小希的迷宫           基础并查集★  
1325&&poj1308   Is It A Tree?]]></description><category></category></item><item><title><![CDATA[ccnu_2016_暑期模拟赛(1)]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/52080039</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/52080039</guid><author>Code_J_xer</author><pubDate>Sun, 31 Jul 2016 18:48:41 +0800</pubDate><description><![CDATA[这套题本来是要当做第一周的模拟训练赛的，有几道题是CF上的，但是由于当时做题的时候CF崩了，所以临时换了一套题，没有用这套题。 
今天把这套题补完了。A. Devu, the Singer and Churu, the JokerDevu is a renowned classical singer. He is invited to many big functions/festivals. Re]]></description><category></category></item><item><title><![CDATA[ccnu_2016_summer_week1(2)_贪心]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/52067455</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/52067455</guid><author>Code_J_xer</author><pubDate>Fri, 29 Jul 2016 17:57:34 +0800</pubDate><description><![CDATA[暑期集训的第三套题。简单贪心。

1.发工资咯：）

作为杭电的老师，最盼望的日子就是每月的8号了，因为这一天是发工资的日子，养家糊口就靠它了，呵呵 
但是对于学校财务处的工作人员来说，这一天则是很忙碌的一天，财务处的小胡老师最近就在考虑一个问题：如果每个老师的工资额都知道，最少需要准备多少张人民币，才能在给每位老师发工资的时候都不用老师找零呢？ 
这里假设老师的工资都是正整数，单位元，人民币一共]]></description><category></category></item><item><title><![CDATA[ccnu_2016_summer_week1(3)]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/52046557</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/52046557</guid><author>Code_J_xer</author><pubDate>Wed, 27 Jul 2016 16:11:54 +0800</pubDate><description><![CDATA[这套题就是简单的基础题，总共4道题，CF的AB题，各两题。 
A. Pasha and StickPasha has a wooden stick of some positive integer length n. He wants to perform exactly three cuts to get four parts of the stick. Each part must have s]]></description><category></category></item><item><title><![CDATA[UVA 11059(水题)]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/52033583</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/52033583</guid><author>Code_J_xer</author><pubDate>Tue, 26 Jul 2016 10:46:36 +0800</pubDate><description><![CDATA[【题目大意】 
给定一个序列S，最多18个元素，每个元素的范围都是-10到10，对于这个序列S的所有连续子序列，求这些连续子序列中最大的正积。如果最大的积是负数，答案视为0。 
【解法】 
两重循环，枚举S所有的子序列 
【坑点】 
如果是18个10相乘得到10^18，会超出int的范围，所以要用long long类型 
【AC代码】#include <cstdio>
#include <cstri]]></description><category></category></item><item><title><![CDATA[UVA 10285(DFS)]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/52033130</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/52033130</guid><author>Code_J_xer</author><pubDate>Tue, 26 Jul 2016 10:12:19 +0800</pubDate><description><![CDATA[【题目大意】 
在一个给定的矩形区域上，找到一条绝对递减的最长路径 
【解法】 
我一开始是在图上找一个最高点，然后dfs，结果第一个样例都过不了，我找了找这个样例，发现图中有不止一个最高点，所以我就改了一下代码，发现样例过了，就交了一发，结果WA了。仔细想了想，可能这个最长路径不一定事从最高点开始的。于是重新改了一下代码，每个点都dfs一次，取最大值。再交就AC了。 
【坑点】 
最长路径的起点不]]></description><category></category></item><item><title><![CDATA[UVA 725(DFS)]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/52032944</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/52032944</guid><author>Code_J_xer</author><pubDate>Tue, 26 Jul 2016 09:57:30 +0800</pubDate><description><![CDATA[【题目大意】 
给定一个N(2≤N≤79)，用0-9这10个数字，组成两个五位数(可以有前导零)，这10个数字必须全部使用且仅使用一次，使得这两个数的商为N。 
【解法】 
1.dfs找出0-9其中的5个数所形成的五位数(四位数)N1 
2.用第一步找出的这些N1乘以N，得到N2 
3.判断N1、N2所有出现的数字次数都出现且仅出现一次 
4.符合则输出 
【坑点】 
1.每两组输出中间输出空行，最]]></description><category></category></item><item><title><![CDATA[代码debug技巧----对拍]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/51996919</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/51996919</guid><author>Code_J_xer</author><pubDate>Fri, 22 Jul 2016 17:27:54 +0800</pubDate><description><![CDATA[虽然挺早就知道对拍这个方法，但是一直没有去试过，也不知道怎么做。 
今天早上卿爷讲了一下对拍怎么做，觉得很是涨姿势。 
而且上午刚学完就派上了用场，成功地为一道不明所以WA的搜索题找到了一个错误数据，进而改对了代码，成功AC。 
记录一下对拍的方法。 
1：需要先写一个随机数据生成程序datamake.cpp。按照题目的输入格式，随机生成输入数据。 
2：需要写一个绝对正确的程序std.cpp。可以]]></description><category></category></item><item><title><![CDATA[ccnu_2016_暑期模拟赛(2)---bfs]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/51993505</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/51993505</guid><author>Code_J_xer</author><pubDate>Fri, 22 Jul 2016 11:58:53 +0800</pubDate><description><![CDATA[做完这题确实深有感触。 
而且早上刚听完卿爷讲怎么对拍。刚好就在这个题用上了对拍的debug手段。也第一次体会到了对拍的便捷之处。 
做这道题的过程还是很艰辛的： 
—>昨天模拟赛赛时其实我已经明白这道题怎么写了，而且也将代码完成了90%左右。但是虽然写了，但是心里一直觉得自己过不了这题，可能是由于之前一直不会搜索导致的对我自己写的搜索算法没有信心，事实上，从我今天AC的代码来看，昨天的代码基本上是]]></description><category></category></item><item><title><![CDATA[写一个控制台运行的计算器]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/51988847</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/51988847</guid><author>Code_J_xer</author><pubDate>Thu, 21 Jul 2016 23:03:14 +0800</pubDate><description><![CDATA[其实这是去年写的程序了，一个很简陋的程序。 
去年上数据结构，老师让我们自己选题写一个程序。那个时候刚学完后缀表达式，本来打算把书本上介绍的计算后缀表达式的程序实现出来，后来觉得太不形象，就想干脆做一个计算器的样子出来吧，当时还不会写GUI，所以就在控制台写了一个“伪GUI”，虽然丑了点，但是还是确实可以用的。 
开发环境：Windows 8.1    —    CodeBlocks13.12 
先]]></description><category></category></item><item><title><![CDATA[2016暑期集训---周赛(水题)]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/51986516</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/51986516</guid><author>Code_J_xer</author><pubDate>Thu, 21 Jul 2016 20:42:40 +0800</pubDate><description><![CDATA[今天被这个题前前后后折磨了好几次。其实最开始就想到可能需要用数组来存数。但是做题过程中却偏偏只是一步一步地放大储存容量。我感觉这可能是程序员的一个小小职业病。由于计算机的存储空间以及计算性能是有限的，所以一直精打细算时间跟空间，一种“不浪费时间和空间的思想”让我在这题上栽倒了好几次。第一次，用int存数。显然，要挂。其实这次WA是不意外的。 
第二次，于是把所有的数都换成了long long。结果。]]></description><category></category></item><item><title><![CDATA[2016暑期集训---搜索(BFS 八方向马步问题)]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/51971955</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/51971955</guid><author>Code_J_xer</author><pubDate>Wed, 20 Jul 2016 21:02:01 +0800</pubDate><description><![CDATA[做这题的时候是给自己定时做的，我觉得定时做一道题的效果很不错。这样我才能够专心地想这道题怎么写。这对于容易分心的我来说并不是一件很容易的事情。其实写完这道题还是很开心的，也是1A的，开心的原因是因为以前其实一直没有真正地懂搜索，只知道思想，但是敲不出代码。估计要是以前做的话，我是做不到今天这样的，“看题，想思路，敲代码，AC！”但是这次做到了，值得欣慰的是，我今年的暑期集训我一直秉承着决不看题解的态]]></description><category></category></item><item><title><![CDATA[一个Sqrt函数引发的血案]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/51971157</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/51971157</guid><author>Code_J_xer</author><pubDate>Wed, 20 Jul 2016 19:02:05 +0800</pubDate><description><![CDATA[源码下载地址：http://diducoder.com/sotry-about-sqrt.html好吧，我承认我标题党了，不过既然你来了，就认真看下去吧，保证你有收获。我们平时经常会有一些数据运算的操作，需要调用sqrt，exp，abs等函数，那么时候你有没有想过：这个些函数系统是如何实现的？就拿最常用的sqrt函数来说吧，系统怎么来实现这个经常调用的函数呢？虽然有可能你平时没有想过这个问题，不过正]]></description><category></category></item><item><title><![CDATA[2016暑期集训---搜索(简单BFS+路径储存)]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/51970188</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/51970188</guid><author>Code_J_xer</author><pubDate>Wed, 20 Jul 2016 17:04:51 +0800</pubDate><description><![CDATA[搜索的功底还是太弱了，写这题谢了快两个小时。主要的时间花费在思考如果储存路径上了。 
因为题目要求的是最短路径，而且保证题目有唯一解，那么只要宽搜从（0,0）点搜到（4,4）点就是走的路径了。但是麻烦的是记录中间路径。【题面】迷宫问题Description 
定义一个二维数组： int maze[5][5] = {0, 1, 0, 0, 0,0, 1, 0, 1, 0,0, 0, 0, 0, 0,0]]></description><category></category></item><item><title><![CDATA[2016暑期集训---搜索(简单BFS)]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/51968968</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/51968968</guid><author>Code_J_xer</author><pubDate>Wed, 20 Jul 2016 15:40:21 +0800</pubDate><description><![CDATA[果然我还是不懂搜索，这道简单的，应该算得上是入门的级别的搜索我写代码+debug 花了我整整半天的时间，不过值得欣慰的是，我似乎悟懂了一点点“从当前状态搜索到其他状态”的方法和技巧。【题面】Catch That CowDescription 
Farmer John has been informed of the location of a fugitive cow and wants to ca]]></description><category></category></item><item><title><![CDATA[Leetcode 100 : same Tree]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/51946680</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/51946680</guid><author>Code_J_xer</author><pubDate>Mon, 18 Jul 2016 23:37:55 +0800</pubDate><description><![CDATA[Leetcode—100same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same valu]]></description><category></category></item><item><title><![CDATA[2016暑期集训---搜索(简单BFS)]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/51945588</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/51945588</guid><author>Code_J_xer</author><pubDate>Mon, 18 Jul 2016 21:09:57 +0800</pubDate><description><![CDATA[虽然，虽然，这道题很简单。 
但是我一直觉得我自己关于搜索可以算是一点都不会的，所以写得时候也是有点没底，可是，出乎意料的是我代码写完测了一下样例是对的，交了之后发现过了，还是很开心的！看题，想题，敲代码， 交题，AC！对，就是没有debug这一步，这种没有一顺溜，不用debug就过题的感觉真爽。第一次从搜索的题目上得到快感。红与黑 
Description 
有一间长方形的房子，地上铺了红色、黑色]]></description><category></category></item><item><title><![CDATA[2016暑期集训---搜索(整数拆分)]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/51945182</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/51945182</guid><author>Code_J_xer</author><pubDate>Mon, 18 Jul 2016 20:24:52 +0800</pubDate><description><![CDATA[Placing applesDescription 
We are going to place M same apples into N same plates. 
There could be some empty plates. 
How many methods do we have? 
When we have 7 applesand 3 plates, the methods, (1,]]></description><category></category></item><item><title><![CDATA[Leetcode 226:Invert a binary tree]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/51944831</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/51944831</guid><author>Code_J_xer</author><pubDate>Mon, 18 Jul 2016 19:40:38 +0800</pubDate><description><![CDATA[Leetcode—226Invert a binary tree.     4
   /   \
  2     7
 / \   / \
1   3 6   9
to     4
   /   \
  7     2
 / \   / \
9   6 3   1
【题目大意】：反转二叉树 
第一次在知乎看到这个题目背后的故事的时候觉得蛮惊奇的 
【解法】：简单的二叉树遍历，后续遍历 
【AC代码】]]></description><category></category></item><item><title><![CDATA[Leetcode 237:Delete Node in a Linked List]]></title><link>https://blog.youkuaiyun.com/Code_J_xer/article/details/51944627</link><guid>https://blog.youkuaiyun.com/Code_J_xer/article/details/51944627</guid><author>Code_J_xer</author><pubDate>Mon, 18 Jul 2016 19:10:12 +0800</pubDate><description><![CDATA[Leetcode—237Delete Node in a Linked List 
 Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 -> 4 and y]]></description><category></category></item></channel></rss>