经典的DP问题,DP思想也很直接:直接贴代码: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int max_size=1001; 7 int n, a[max_size][max_size]; ...
分类:
其他好文 时间:
2015-01-01 19:44:21
阅读次数:
224
program onlyRunOne;uses Forms,Windows,SysUtils, Dialogs, Unit1 in 'Unit1.pas' {Form1};{$R *.res}varmyMutex:HWND;beginmyMutex:=CreateMutex(nil,false,.....
Pascal's Triangle II Total Accepted: 19384 Total Submissions: 63446 My Submissions Question SolutionGiven an index k, return the kth row of the Pascal...
分类:
其他好文 时间:
2014-12-31 00:54:24
阅读次数:
291
Pascal'sTriangleGivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3...
分类:
其他好文 时间:
2014-12-31 00:51:58
阅读次数:
200
http://poj.org/problem?id=2954表示我交了20+次...为什么呢?因为多组数据我是这样判断的:da=sum{a[i].x+a[i].y},然后!da就表示没有数据了QAQ我居然查了如此久都没查出来!!!!注意负数啊负数啊啊啊啊啊啊啊本题是pick定理:当多边形的顶点均为整...
分类:
其他好文 时间:
2014-12-30 13:26:11
阅读次数:
127
The number of steps
Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^
题目描述
Mary stands in a strange maze, the maze looks like a triangle(the first layer have one room,the second lay...
分类:
其他好文 时间:
2014-12-29 09:05:37
阅读次数:
206
准备说明,Ubuntu上面是没有rmp工具的,所以我们下载的时候都是下载tar包。
1.安装jdk
上oracel官网站下载java jdk for linux。
下载完毕,把这个文件复制到自己想放置的目录下,然后解压。
tar zvxf jdk的名称.tar
然后配置环境变量,需要切换到root用户权限。
设置切换到root用户需要给root设置密码:
sude pas...
分类:
移动开发 时间:
2014-12-28 14:15:54
阅读次数:
308
题目:
解决方案:
public class Solution {
public List> generate(int numRows) {
List> lists=new ArrayList>();
for(int i=0;i<numRows;i++){
List list=new ArrayList();
...
分类:
其他好文 时间:
2014-12-27 11:26:52
阅读次数:
163
UBUNTU系统启动时默认以安装系统时输入的用户名进行登录。如:以非root帐号rusky登录系统,当我们做某些操作时系统提示需要输入root密码。但我们并没有设置过root密码。此时,可按如下操作为root设置一个密码:rusky@rusky-pc:/$ sudo passwd[sudo] pas...
分类:
系统相关 时间:
2014-12-27 00:12:22
阅读次数:
253
DescriptionProblem B: Myacm TrianglesProblem B: Myacm TrianglesSource file:triangle.{c, cpp, java, pas}Input file:triangle.inOutput file:triangle.outT...
分类:
其他好文 时间:
2014-12-26 14:19:17
阅读次数:
223