Given the following perfect binary tree, 1 / \ 2 3 / \ / \ 4 5 6 7 After calling your function, the tree should look like: 1 -> NULL / \ 2 -> 3 -> NUL
分类:
其他好文 时间:
2016-02-18 01:21:18
阅读次数:
219
该题目的大意是,给出一个目标整数,算出由完全平方数累加得到目标整数的最小个数。比较好的解决方法是使用动态规划。...
分类:
其他好文 时间:
2016-01-30 02:55:44
阅读次数:
142
题目大概就是求一个n个不同的数能构造出几种形态的二叉排序树。和另一道经典题目n个结点二叉树不同形态的数量一个递推解法,其实这两个问题的解都是是卡特兰数。dp[n]表示用n个数的方案数转移就枚举第几个数作为根,然后分成左右两子树,左右两子树的方案数又是相似子问题另外就是题目得先找到[1,1e10]的p...
分类:
其他好文 时间:
2016-01-25 21:14:57
阅读次数:
347
以动词work为例,时态的构成形式。时间\动作一般(simple)进行(Continuous)完成(Perfect)完成进行(Perfectcontinuous)现在(Present)Works/workAm/is/areworkingHas/haveworkedHas/havebeenworkin...
分类:
其他好文 时间:
2016-01-21 23:14:07
阅读次数:
307
apk 反编译大家都比较熟悉,这里只做一个笔记。1 反编译 apkapktool d perfect.apk这样就把资源文件解压缩了, classes.dex 也反编译成了 smali 文件2 修改 smali 文件得到 smali 文件,现在就可以对 smali 文件进行修改和添加自己的代码了。当...
分类:
移动开发 时间:
2016-01-21 00:30:12
阅读次数:
301
#include #include #include #include #include using namespace std;int flag;char s[100000+10];int zero;char q[100000+10];bool Perfect(){ int len=strl...
分类:
其他好文 时间:
2016-01-19 13:57:23
阅读次数:
118
留坑(p.343)完全不知道哪里有问题qwq从31向下开始枚举p,二分找存在性,或者数学函数什么的也兹辞啊 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 void setIO.....
分类:
其他好文 时间:
2016-01-07 20:20:30
阅读次数:
174
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n.For example, given n = 12, ...
分类:
其他好文 时间:
2015-12-26 06:27:31
阅读次数:
146
最近看了一篇关于如何提高UITableView性能的文章,英文原版的地址:https://medium.com/ios-os-x-development/perfect-smooth-scrolling-in-uitableviews-fd609d5275a5#.jet1gcbax,看完之后将重要的...
分类:
移动开发 时间:
2015-12-23 01:51:47
阅读次数:
212
题目:Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n.For example, given n = 1...
分类:
其他好文 时间:
2015-12-13 09:51:42
阅读次数:
125