这是“使用 C# 开发智能手机软件:推箱子” 系列文章的第十八篇。在这篇文章中。介绍 Window/SelectLevelDlg.cs 源程序文件。这个源程序文件包括 SelectLevelDlg 类,该类继承自 System.Windows.Forms.Form 类。表示推箱子的“选关”对话框。例 ...
分类:
移动开发 时间:
2017-04-20 20:53:56
阅读次数:
212
题目描写叙述: Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 解题思路:暴力求解。以每一个点为中心,然后遍历剩余的点。对每一个点。初始化一个map ...
分类:
其他好文 时间:
2017-04-20 20:00:29
阅读次数:
163
(二)Maximum margin hyperplane for linearly separable classes (线性可分的数据的最大间隔分类器) 接上文,假设SVM分类器是由两种线性可分的数据集训练而成,其决定函数(decision function)为: (2.1) 其中为定义该超平面的 ...
分类:
系统相关 时间:
2017-04-19 10:22:43
阅读次数:
394
题目: Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2, ...
分类:
其他好文 时间:
2017-04-18 20:56:29
阅读次数:
153
题意:给出n个数,求最大连续的子区间和,并且输出该区间的第一个和最后一个数。 如果所有数都小于0,那么则输出0,第一个数和最后一个数。 看数据k的范围,就知道肯定不能两层for循环来求区间和,O(n^2)的复杂度肯定超时所以这里肯定要求一遍for循环就能知道结果定义区间l和r,sum为目前[l,r] ...
分类:
其他好文 时间:
2017-04-18 16:08:53
阅读次数:
213
一、递归函数 定义:函数内部可以调用其它函数,如果调用自身,就叫递归。 递归特性: 1.必须有结束条件退出: >>> def calc(n): ... print(n) ... return calc(n+1) ... >>> calc(0) 0 1 ... 998 RecursionError: ...
分类:
其他好文 时间:
2017-04-17 18:48:01
阅读次数:
196
本文解决最大子序列和问题,有两个题目组成,第二个题目比第一个要求多一些(其实就是要求输出子序列首尾元素)。 01-复杂度1 最大子列和问题 (20分) 给定KK个整数组成的序列{ N1??, N2??, ..., NK?? },“连续子列”被定义为{ N?i??, Ni+1 ..., Nj },其中 ...
分类:
其他好文 时间:
2017-04-17 10:07:11
阅读次数:
216
本周继续练习动态规划的相关题目。 题目: In the computer world, use restricted resource you have to generate maximum benefit is what we always want to pursue. For now, su ...
分类:
其他好文 时间:
2017-04-16 22:33:27
阅读次数:
145
我自己写的divide&conquer /** * Definition of TreeNode: * public class TreeNode { * public int val; * public TreeNode left, right; * public TreeNode(int val ...
分类:
其他好文 时间:
2017-04-16 21:17:55
阅读次数:
154
修改my.ini# The maximum amount of concurrent sessions the MySQL server will # allow. One of these connections will be reserved for a user with # SUPER p ...
分类:
数据库 时间:
2017-04-15 18:02:56
阅读次数:
232