码迷,mamicode.com
首页 >  
搜索关键字:find grep    ( 34568个结果
linux awk
简介awk是一个强大的文本分析工具,相对于grep的查找,sed的编辑,awk在其对数据分析并生成报告时,显得尤为强大。简单来说awk就是把文件逐行的读入,以空格为默认分隔符将每行切片,切开的部分再进行各种分析处理。awk有3个不同版本: awk、nawk和gawk,未作特别说明,一般指gawk,g...
分类:系统相关   时间:2014-05-23 05:24:57    阅读次数:435
unity3d鼠标经过物体时变颜色,离开时恢复
Color CubeColor = ObjCube.renderer.material.GetColor("Object名称"); //这样写无法获取物体真实颜色,得到的是(0,0,0,0) ,正确方法是,ObjCube.renderer.material.shader = Shader.Find(...
分类:其他好文   时间:2014-05-23 05:11:16    阅读次数:308
【LeetCode】3Sum Closest
Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. You m...
分类:其他好文   时间:2014-05-23 03:21:10    阅读次数:287
HDU1800Flying to the Mars(字典树)
题目: Problem Description In the year 8888, the Earth is ruled by the PPF Empire . As the population growing , PPF needs to find more land for the newborns . Finally , PPF decides to att...
分类:其他好文   时间:2014-05-23 02:32:42    阅读次数:298
最小生成树模版
克鲁斯卡尔 struct edge { int u, v, w; }e[maxn]; int f[110]; bool cmp(edge a, edge b) { return a.w < b.w; } int find(int x) { if(x != f[x]) return f[x] = find(f[x]); return f[x]; } int MST() { int...
分类:其他好文   时间:2014-05-23 02:15:51    阅读次数:267
Geeks Union-Find Algorithm Union By Rank and Path Compression 图环算法
同样是查找一个图是否有环的算法,但是这个算法很牛逼,构造树的时候可以达到O(lgn)时间效率。n代表顶点数 原因是根据需要缩减了树的高度,也叫压缩路径(Path compression),名字很高深,不过其实不难理解,简单来说就是每次查找一个节点的时候,都把这一路径中的所有节点都赋予根节点作为路径。 原文没指出的地方: 也因为需要压缩,所以初始化的时候注意,不能如前面简单实用Unio...
分类:其他好文   时间:2014-05-23 00:21:42    阅读次数:305
欧拉项目004:寻找最大的回文数
Problem 4: Largest palindrome product A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest pal...
分类:其他好文   时间:2014-05-22 18:48:46    阅读次数:355
【LeetCode】3Sum
Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen...
分类:其他好文   时间:2014-05-22 16:53:52    阅读次数:173
Single Number
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity...
分类:其他好文   时间:2014-05-22 16:31:03    阅读次数:194
Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:其他好文   时间:2014-05-22 16:05:56    阅读次数:239
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!