原题地址:https://oj.leetcode.com/problems/n-queens-ii/题意:和N-Queens这道题其实是一样的,只不过这次要求返回的时N皇后的解的个数的问题。解题思路:上道题使用了递归回溯的解法,这道题我们可以使用非递归回溯来解决,因为如果使用递归回溯来解决,那么代码...
分类:
编程语言 时间:
2014-05-26 08:14:55
阅读次数:
288
Time Limit: 2000/1000 MS (Java/Others) Memory
Limit: 65536/32768 K (Java/Others) Total Submission(s): 137169 Accepted
Submission(s): 31787 Problem Des...
分类:
其他好文 时间:
2014-05-26 07:37:31
阅读次数:
314
原地踏步了半年,感觉一切都陌生了~题意:a[i]-一个任意的数,这个数要等于a[1]~a[i-1]每个数减去任意一个数,经过多次这样的变换到达目标b序列,能到达就yes不能到达距no.一开始各种分析,所有的差的和必须是偶数,sum(cha[1~i-1])>=cha[i](其中cha[i]=a[i]-...
分类:
其他好文 时间:
2014-05-26 07:09:20
阅读次数:
231
IDE: MDK V4+
MCU: LPC17xx(Cortex-M3)
RTOS: µC/OS-II
升级顺序:V2.52->V2.62->V2.76->V2.86->V2.91
V2.52
一、startup*.s (startup_lpc17xx.s)
1. 更改两个中断服务函数名称
...
分类:
其他好文 时间:
2014-05-26 06:12:20
阅读次数:
326
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have
exact...
分类:
其他好文 时间:
2014-05-25 00:46:51
阅读次数:
229
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume
that each input would have exact...
分类:
其他好文 时间:
2014-05-24 20:43:37
阅读次数:
341
在Mongodb的查询中,有类似于SQL中group
by功能的group函数.两者的功能有些类似,但是区别也是比较明显的.对于SQL来说,group
by的作用就是安装依据列来将数据表中的记录分成一个个的组,而查询结果中,只能Select出来Group BY中含有的列,或者使用了聚合函数(sum,...
分类:
数据库 时间:
2014-05-24 09:20:01
阅读次数:
251