码迷,mamicode.com
首页 >  
搜索关键字:num    ( 9856个结果
javascript学习笔记---ECMAScript-判断变量类型
判断类型之前,先要清楚有哪些类型。(理理思路:程序由数据和方法构成,数据由简单数据和复杂数据构成)即类型有: 数据(简单数据:boolean,string,num,undefined,null。复杂数据:object), 方法(function)万能的typeof,神一样的方法 typeof(...
分类:编程语言   时间:2014-06-07 05:40:05    阅读次数:309
uva10474 - Where is the Marble?
1 #include 2 #include 3 using namespace std; 4 const int Max = 100000; 5 int num[Max]; 6 int find_[Max]; 7 bool found[Max]; 8 int pos[Max] = { 9 ...
分类:其他好文   时间:2014-06-07 03:49:29    阅读次数:250
c itoa和atoi
#include using namespace std;int main(){#if 1 int num = 12345; char str[25];//不要写成char*,因为没有分配空间 itoa(num, str, 10);//10进制字符串 printf("num ...
分类:其他好文   时间:2014-06-07 03:32:09    阅读次数:215
POJ 2029 Get Many Persimmon Trees
这是动态规划?我一点思路怎么也没有。最后还是用矩阵部分求和枚举0MS。 题目大意: 给出一个矩阵,上面有几个点。在给一个小点儿的矩阵,求这个矩阵最多能套上几个点。(注意:小矩阵长宽给定,不能旋转)。 解题思路: 建立数组num[i][j]代表点(1,1)到点(i,j)组成的矩阵里有几个点。 下面是代码: #include #include int num[1...
分类:其他好文   时间:2014-06-05 06:14:33    阅读次数:226
继承类中static数据值
1 class A{ 2 static int num = 1; 3 public static void Display(){ 4 System.out.println( num ); 5 } 6 } 7 8 class B extends A{ 9 ...
分类:其他好文   时间:2014-06-04 22:47:14    阅读次数:219
Combination Sum
Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated num...
分类:其他好文   时间:2014-06-04 20:15:09    阅读次数:289
递增数据插入表(二)
递增数据插入表,我们还可以使用生成随机数来填充,建表的时候使用约束,不能重复,重复的话自然就不插入,继续生成下一个不重复的随机数。还是以之前的为例,插入表中的数据为100-999。我们不谈性能(插入数据量小速度也很快的),只谈逻辑。create table TestNum(num numeric(3...
分类:其他好文   时间:2014-06-03 09:04:02    阅读次数:249
纯tarjan poj2186
tarjan,叙叙旧咯#include#define maxn 50005int e[maxn],ne[maxn],be[maxn],all;int DFN[maxn],LOW[maxn],stack[maxn],curr,stak;bool instack[maxn];int num,belong...
分类:其他好文   时间:2014-05-29 23:09:39    阅读次数:219
Leetcode刷题录之Two Sum
题意大概是给出一个数列num,和一个目标数target,然后要找出数列中的两个数,使得这两个数之和等于目标数,输出这两个数的下标值(从1开始算)。 一个比较暴力的方法是用一个二重循环直接遍历序列,在第一重循环中找到a,在第二重循环中找到b,使得a+b=target,这种做法的时间复杂度是O(n^2....
分类:其他好文   时间:2014-05-29 21:01:06    阅读次数:307
leetcode -- 4sum
class Solution {public: vector > ret; vector subret;public: vector > fourSum(vector &num, int target) { sort(num.begin(),num.end()); ...
分类:其他好文   时间:2014-05-29 09:31:13    阅读次数:288
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!