向栈中压入数据:lua_pushnil(lua_State*);lua_pushboolean(lua_State*, bool);lua_pushnumber(lua_State*, lua_Number);lua_pushinteger(lua_State*, lua_Integer)lua_p...
MatrixTime Limit:3000MSMemory Limit:65536KDescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row...
分类:
其他好文 时间:
2014-07-01 21:17:23
阅读次数:
190
编程语言都是相同的,JS中也是有变量的。首先JS的变量是区分大小写的,这个需要注意,比如number和Number是不同的变量。不管是常用类型的,还是对象类型,比如 Object obj和Object Obj是两个对象。然后是对变量赋值,这个基本都一样,可以先声明再赋值,var i;
i=0;也可以声明时赋值,var i=2;而变量如果你不重新赋值,它是不会改变的,比如var i=2;
var i...
分类:
编程语言 时间:
2014-07-01 07:50:47
阅读次数:
201
题目连接:uva 11885 - Number
of Battlefields
题目大意:给出周长p,问多少种形状的周长为p的,并且该图形的最小包围矩阵的周长也是p,不包括矩形。
解题思路:矩阵快速幂,如果包含矩形的话,对应的则是斐波那契数列的偶数项,所以对应减去矩形的个数即可。
#include
#include
typedef long long ll;
const l...
分类:
其他好文 时间:
2014-07-01 06:21:33
阅读次数:
226
Pending Queue Size The number of messages in the queue that have yet to bedelivered to any clientDispatched Counter The number of message in the q...
分类:
其他好文 时间:
2014-07-01 00:23:41
阅读次数:
268
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:
其他好文 时间:
2014-06-30 21:36:50
阅读次数:
292
题目
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it witho...
分类:
其他好文 时间:
2014-06-30 19:38:37
阅读次数:
226
题目
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it...
分类:
其他好文 时间:
2014-06-30 19:23:18
阅读次数:
200
题目
Given n points
on a 2D plane, find the maximum number of points that lie on the same straight line.
方法
每次选择一个点,和其他n - 1个点,进行判断,统计最多的。
double computeSlope(Point a, Point b) {
...
分类:
其他好文 时间:
2014-06-30 15:48:45
阅读次数:
184