Given two integersnandk, return all possible
combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution
is:[ [2,4], [3,4], [2,3],...
分类:
其他好文 时间:
2014-05-14 03:54:40
阅读次数:
250
下面为您介绍的语句用于实现Oracle查询用户所有表,如果您对oracle查询方面感兴趣的话,不妨一看。select * from
all_tab_comments -- 查询所有用户的表,视图等select * from user_tab_comments --
查询本用户的表,视图等select...
分类:
数据库 时间:
2014-05-12 11:18:14
阅读次数:
362
题意:有 n 个人,每个人有一个diaosi值a[i],如果第 i 个人排在第 k 位置,则他的愤怒值就为a[i]*(k-1);
过程中有一个黑屋子,可以把人暂时放到黑屋子里。
求总的愤怒值最小;
区间DP:对dp[i][j],我们考虑i到j的(j-i+1)个人,对于第i个人我们可以假设他在第k个位置,则前面就有k-1个人在他前面,j-k个人在他后面,所以dp[i][j]=m...
分类:
其他好文 时间:
2014-05-12 07:02:55
阅读次数:
275
题目描述Jim is boss of a big company . There are so
many workers in his company that it will take a long time for his command send
to all of his workers ....
分类:
其他好文 时间:
2014-05-12 04:51:29
阅读次数:
307
题目描述N cities are connected by a network of M
one-way roads. It is known that these roads do not cross outside the cities. The
numeration of the cities...
分类:
其他好文 时间:
2014-05-12 01:13:06
阅读次数:
345
策略模式定义了一系列的算法,并将每一个算法封装起来,而且使它们还可以相互替换。策略模式让算法独立于使用它的客户而独立变化。(原文:The Strategy
Pattern defines a family of algorithms,encapsulates each one,and makes t...
分类:
其他好文 时间:
2014-05-12 00:57:39
阅读次数:
326
1、
??
Surrounded Regions
Given a 2D board containing 'X' and 'O',
capture all regions surrounded by 'X'.
A region is captured by flipping all 'O's into 'X's
in that surrounded region.
For e...
分类:
其他好文 时间:
2014-05-11 18:52:32
阅读次数:
293
Reverse a linked list from positionmton. Do it
in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m=
2 andn= 4,return1->4->3->2->5->NULL.No...
分类:
其他好文 时间:
2014-05-11 16:03:43
阅读次数:
327
1.给root账户授权所有sql权限
grant all privileges on *.* to root@"%" identified by ".";flush privileges;
2.建立bat批处理文件
@echo off
set path=%path%;D:\Program Files\MySQL\MySQL Server 5.5\bin
set y=%date:~0,4%
s...
分类:
数据库 时间:
2014-05-11 03:11:33
阅读次数:
406
原题链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1424
逐渐找到做这种题的感觉了。 二分法。g[i][j]存储坐标(i, j)的值,s[i][j]存储的值为左上角为起始点(1,1),右下角为(i,
j)的矩形区域内所有值的和,那么...
分类:
其他好文 时间:
2014-05-10 22:55:11
阅读次数:
347