Problem Description
FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At e...
分类:
其他好文 时间:
2014-08-13 14:56:46
阅读次数:
236
一、要引用的文件 要使用jqGrid,首先页面上要引入如下css与js文件。 1、css 2、js 二、使用要点说明 1、获取行号 获取行号,有这种方式: var rowid = $("#grid-table").jqGrid("getGridParam", "selrow...
分类:
其他好文 时间:
2014-08-13 14:29:56
阅读次数:
309
Problem Description
There is a forest can be seen as N * M grid. In this forest, there is some magical fruits, These fruits can provide a lot of energy, Each fruit has its location(Xi, Yi) and the en...
分类:
其他好文 时间:
2014-08-13 10:36:35
阅读次数:
214
题目:Walking on a Grid
题目大意:给出N * N的矩阵,每个格子里都有一个值,现在要求从(1,1)走到(n, n),只能往下,左,右这三个方向走,并且要求最多只能取k个负数,求这样的要求下能得到的走过格子的值之和最大。
解题思路:记忆化搜索,但是这里要四维的,因为要记录方向,为了防止走回头的路,并且取了几个负数也要记录。然后就是dfs了。状态转移方程:dp【x...
分类:
其他好文 时间:
2014-08-13 01:16:55
阅读次数:
222
dojo中经常出现对表格中的某行进行操作,如单击某行修改、删除等。那怎样获取某行的唯一标示呢?
如查询表格中的某列有个userId,并且这个是唯一的,那么可以通过它来访问这一列
具体操作代码如下:
var grid = dijit.byId("gridId");
function btnClick(e)
{
use...
分类:
其他好文 时间:
2014-08-13 01:11:45
阅读次数:
171
Problem Description
There is a forest can be seen as N * M grid. In this forest, there is some magical fruits, These fruits can provide a lot of energy, Each fruit has its location(Xi, Yi) and the ...
分类:
其他好文 时间:
2014-08-12 22:19:04
阅读次数:
488
Problem DescriptionThere is a forest can be seen as N * M grid. In this forest, there is some magical fruits, These fruits can provide a lot of energy...
分类:
其他好文 时间:
2014-08-12 21:51:34
阅读次数:
225
Magical ForestProblem DescriptionThere is a forest can be seen as N * M grid. In this forest, there is some magical fruits, These fruits can provide a...
分类:
其他好文 时间:
2014-08-12 21:37:34
阅读次数:
194
题目:Problem Description There is a forest can be seen as N * M grid. In this forest, there is some magical fruits, These fruits can provide a lot of .....
分类:
其他好文 时间:
2014-08-12 18:34:54
阅读次数:
282
题目链接:uva 11605 - Lights inside a 3d Grid
题目大意:给定一个三维坐标系大小,每个位置有一个灯,初始状态为关,每次随机选中两个点,以这两点为对角线的长方体内所有灯转变状态。操作K次,问说平均情况下,最后会有多少栈灯亮着。
解题思路:枚举坐标系上的点,计算单个点亮着的概率,然后累加即使整体的期望。对于一个点x,y,z,分别考虑每维坐标系,例如x,选中...
分类:
其他好文 时间:
2014-08-12 10:20:34
阅读次数:
182