2017年9月1日
摘要:
简单路径(不包括环) DFS遍历以及回溯得到结果
阅读全文
posted @ 2017-09-01 19:52
wastonl
阅读(3902)
推荐(0)
摘要:
一个无向图G是一颗树的条件: G必须是无回路的连通图或者是n-1条边的连通图 思路: 如果能通过一次dfs就能够访问图中所有顶点, 并且访问的边是n-1条则此图是一个棵树 参考: 王道考研数据结构复习指导
阅读全文
posted @ 2017-09-01 18:32
wastonl
阅读(2622)
推荐(1)
posted @ 2017-09-01 17:19
wastonl
阅读(177)
推荐(0)
2017年7月30日
摘要:
1. 批量更新插入 jdbcTemplate.batchUpdate(String sql, List<Object[]> batchArgs) Object[]数组的长度为每条记录的参数个数(也就是sql语句中"?"的个数) List: 总共插入多少条记录。 2. 单条记录插入获取主键id
阅读全文
posted @ 2017-07-30 22:15
wastonl
阅读(6794)
推荐(0)
2017年6月15日
摘要:
记录公众号微信支付开发以及踩过的坑 支付开发文档链接:https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=7_1 一. 开发配置 1) 授权目录(及其重要) 公众号后台/微信支付里配置 2) 网页授权域名(获取权限时需要) 公众号设置/功
阅读全文
posted @ 2017-06-15 16:26
wastonl
阅读(504)
推荐(0)
2017年2月6日
摘要:
public class Feibo { static long[] temp = new long[1000000]; static long fun1(int n){ if(temp[n]!=0) return temp[n]; if(n==1||n==2) return temp[1]=temp[2]=1; return temp[n]=fun1(n-2...
阅读全文
posted @ 2017-02-06 11:57
wastonl
阅读(208)
推荐(0)
2016年12月7日
posted @ 2016-12-07 17:02
wastonl
阅读(869)
推荐(0)
2016年11月5日
摘要:
错误信息: Exception in thread "main" java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer
阅读全文
posted @ 2016-11-05 19:44
wastonl
阅读(574)
推荐(0)
2016年9月11日
摘要:
题目大意: f(l,r)=a[l] l==r f(l,r)=f(l,r-1)%a[r] l<r 思路: 由此可以推出f(l,r)=a[l]%a[l+1]%a[l+2]%....%a[r] 根据取余的性质,只要后面取余的数不小于前面的数值不会改变,因此我们只要记录比a[l]小的第一个数,假如为a[x]
阅读全文
posted @ 2016-09-11 13:39
wastonl
阅读(321)
推荐(0)
2016年9月9日
摘要:
/* 题目大意: 有n个问题,,告诉你答对该题能得多少分,其中一个人随机答题,问另一个人不输的概率为p 至少需要答多多少分 对于样例: 3 0.5 1 2 3 分析: 分数 0 1 2 3 3 4 5 6 次数 1 1 1 2 1 1 1 1 位置 1 2 3 4 5 6 7 8 不输的概率为0.5 那么对应...
阅读全文
posted @ 2016-09-09 10:08
wastonl
阅读(160)
推荐(0)