01 2015 档案
摘要:第一题:K等于1或者2,非常简单。略。K更多的情况,http://www.cnblogs.com/lautsie/p/4242975.html,值得思考。第二题:http://www.cnblogs.com/lautsie/p/4245242.htmlBFS和DFS都可以,注意的是,写的时候,可以往...
阅读全文
摘要:第一题,http://community.topcoder.com/stat?c=problem_statement&pm=13462&rd=16076模拟就可以了。#include #include using namespace std;class Target {public: vector...
阅读全文
摘要:http://community.topcoder.com/stat?c=problem_statement&pm=13628&rd=16278标程是BFS,我用DFS,都可解。这里复杂的把pair写了hash函数,其实直接用个矩阵来存bool就可以了。#include #include #incl...
阅读全文
摘要:http://community.topcoder.com/stat?c=problem_statement&pm=13625&rd=16278首先,如果记得曼哈顿距离最小值那个问题,会想起一维的情况可证,点出现在中位数那里是最小的。这里也可证明,四个点,出现在中位数位置是最小的。题解里的做法是,试...
阅读全文

浙公网安备 33010602011771号