代码:
#include
#include
using namespace std;
int n,m;
int father[1005];
int Find(int a)
{
int r=a;
while(father[a]!=a)
{
a=father[a];
}
father[r]=a;
return a;
}
void ...
分类:
其他好文 时间:
2015-07-24 22:46:06
阅读次数:
208
1 2 3 4 5 6 7 8 9 10 11 12 30 31 重点在于上面的return.下面看看return中的所有的参数. 1 { 2 restrict: String, 3 priority: Number...
分类:
Web程序 时间:
2015-07-24 22:29:38
阅读次数:
188
Problem Definition:Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be chan...
分类:
其他好文 时间:
2015-07-24 22:29:06
阅读次数:
148
public static List getAllFileList(File rootFile)
{
return getAllFileList(rootFile.getAbsolutePath(), null);
}
/**
* 获取文件夹下所有文件(包括子文件)
*
* @param filePath
* @param fileList
* @return...
分类:
其他好文 时间:
2015-07-24 20:56:52
阅读次数:
116
block1)用来保存一段代码2)block的标志:^例子: int sum(int a, int b){ return a+b; } int (*p)(int, int) = sum; int (^sumblock)(int, int) = ^(int a, int b){ return a+b;...
分类:
其他好文 时间:
2015-07-24 20:44:03
阅读次数:
151
function build_order_no(){ return date('Ymd').substr(implode(NULL, array_map('ord', str_split(substr(uniqid(), 7, 13), 1))), 0, 8);}用uniqid获取一个基于当前...
分类:
Web程序 时间:
2015-07-24 20:39:48
阅读次数:
181
local lpeg = require "lpeg" function f0() end; function f1() return "a" end function f2() return "a","b" end function ittable(t) for key, value in pa....
分类:
其他好文 时间:
2015-07-24 20:36:31
阅读次数:
245
我的代码是:TreeNode* buildTree (vector &inorder, vector &postorder){ if (inorder.empty ()) { return nullptr; } unordered_map inItDic; ...
分类:
编程语言 时间:
2015-07-24 20:34:30
阅读次数:
158
1 int gcd(int x3,int y3) 2 { 3 int x1 = 1,x2 = 0,y1 = 0,y2 = 1; 4 while(1) 5 { 6 if (y3==1) return y2; 7 int q=x3/y3; 8 ...
分类:
编程语言 时间:
2015-07-24 20:17:44
阅读次数:
117
18岁的生日: 1 #include 2 int m[13]={31,28,31,30,31,30,31,31,30,31,30,31}; 3 int nian(int x){ 4 if(x%400==0||(x%4==0&&x%100!=0))return 1; 5 else re...
分类:
其他好文 时间:
2015-07-24 20:14:36
阅读次数:
127