码迷,mamicode.com
首页 > 其他好文
leetCode 47.Permutations II (排列组合II) 解题思路和方法
Permutations II  Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following unique permutations: [1,1,2], [1,...
分类:其他好文   时间:2015-07-13 14:06:17    阅读次数:130
ZOJ 2366 Weird Dissimilarity (简单DP)
题意: 字符c1和c2的距离为d(c1, c2),已知两个字符串s和t,现在要找长度相等的两个字符串a和b,使得s是a的子序列,t是b的子序列,且a和b的距离最小。 思路: 字串和子序列是不一样的。。。。子序列是允许中间 间断 的,而字串必须是连续的...比赛的时候居然理解错了....T_T 这样的话,用最长公共子序列的思路来解决这道题就好啦~ dp[i][j]表示 “第一个串处理到...
分类:其他好文   时间:2015-07-13 14:04:28    阅读次数:120
leetCode 48.Rotate Image (旋转图像) 解题思路和方法
Rotate Image You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in-place? 思路:其实就是旋转数组,没有什么难度,代码如下: public ...
分类:其他好文   时间:2015-07-13 14:05:28    阅读次数:569
Latex 制作积分规则表格
看过几个 demo 例程之后,实现了自己第一个设计的 Latex 表格\begin{center} \begin{tabular}{l|l|l|l|l|l|l|} \hline \multicolumn{1}{}{}& & \multicolumn{4}{c}{竞猜选择} \\cline{3-7} \multicolumn{1}{}{}& & AA & BA & 平 & AB & BB\\...
分类:其他好文   时间:2015-07-13 14:04:38    阅读次数:102
leetCode 49.Anagrams (回文构词法) 解题思路和方法
Anagrams  Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be in lower-case. 思路:这题要是解,必须知道什么是回文构词法。所谓回文构词法就是把一个单词的顺序调整,形成新的单词,如”eat“,"tea"就是回...
分类:其他好文   时间:2015-07-13 14:04:39    阅读次数:119
hdu 4496 D-City(并查集)
D-City Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 2448    Accepted Submission(s): 862 Problem Description Luxer is a really ba...
分类:其他好文   时间:2015-07-13 14:04:10    阅读次数:135
053第425题
425.Which of the following are included in a transportable tablespace set? (Choose all that apply.) A. The datafiles that make up a self-contained group of tablespaces required for copy B. The syste...
分类:其他好文   时间:2015-07-13 14:04:57    阅读次数:144
排列组合问题:n个数中取m个(Golang实现)
排列组合是一个基本的数学问题,本程序的目标是输出从n个元素中取m个的所有组合。 例如从[1,2,3]中取出2个数,一共有3中组合:[1,2],[1,3],[2,3]。(组合不考虑顺序,即[1,2]和[2,1]属同一个组合)...
分类:其他好文   时间:2015-07-13 14:03:50    阅读次数:111
poj3250 Bad Hair Day
Description Some of Farmer John's N cows (1 ≤ N ≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wants to count the number of other cows that can ...
分类:其他好文   时间:2015-07-13 14:01:45    阅读次数:135
leetCode 50.Pow(x, n) (x的n次方) 解题思路和方法
Pow(x, n)  Implement pow(x, n). 思路:题目不算难,但是需要考虑的情况比较多。 具体代码如下: public class Solution { public double myPow(double x, int n) { boolean isMin0 = true;//结果负号 if(x > 0 || (n&1) == ...
分类:其他好文   时间:2015-07-13 14:02:42    阅读次数:105
leetCode 51.N-Queens (n皇后问题) 解题思路和方法
N-Queens  The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-quee...
分类:其他好文   时间:2015-07-13 14:02:20    阅读次数:114
CodeForces 197B Limit
Limit Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 197B Description You are given two polynomials: P(x)?=?a0·xn?...
分类:其他好文   时间:2015-07-13 14:00:52    阅读次数:128
UVALive 6957 Hyacinth(读题)
解题:     感觉自己读题能力太差,读了好几遍才读懂。题意是指每个节点有两个频率,而题目给出的边代表这两个节点联通,这两个节点联通,则他们必须有一个相同的频率,现求一方案可以使得联通边用的频率数最多。那么,就是能用新值就用新值,若某个节点两个频率都有了,则取其中一个,赋值给另外一个节点的一个频率即可。最后把,仍未填的频率,填一下就好。 代码: #include #include ...
分类:其他好文   时间:2015-07-13 14:00:41    阅读次数:144
复兴镇生活
生命可以很闲,也可以很忙。乡下的生活节奏很缓很平淡,但不乏创造快乐的人们。从四月份开始算起,我已经在复兴镇和华阳河总场呆了4个月了。我想这段经历以后回忆起来感觉应该会有所留念。为何这样说呢?宁静的生活教会了我平和的生活态度。浮华的周边加上内心懦弱的存在使得我焦躁不安,难以放慢那却几乎无法前行的脚步。...
分类:其他好文   时间:2015-07-13 14:00:38    阅读次数:114
过滤器
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, Inherited = true, AllowMultiple = false)]public class RequireSslAttribute :FilterAtt...
分类:其他好文   时间:2015-07-13 14:00:27    阅读次数:100
notification-应用实例
通知的发送跟清除
分类:其他好文   时间:2015-07-13 13:59:23    阅读次数:123
EasyUI知识点
1. easyUI实现动态列,js实现$('#dg').datagrid({ height: 340, url: '${path}/salary/datas.do', method: 'POST', //quer...
分类:其他好文   时间:2015-07-13 13:57:23    阅读次数:137
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!