题目Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which r...
分类:
其他好文 时间:
2014-07-15 23:21:33
阅读次数:
218
exec 命令实例find . -name "*.cc" -exec grep -P -n -H --color=auto "[^\w]main[^\w]" {} \;-P perl正则查找-n 显示行号-H 显示文件名--color=auto 关键字高亮显示[^\w]main[^\w] main关...
分类:
其他好文 时间:
2014-07-15 09:32:46
阅读次数:
244
3SumGiven 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:El...
分类:
其他好文 时间:
2014-07-15 08:51:50
阅读次数:
231
FRIENDS题意:找出最大的朋友圈#include #define N 30005int fa[N], ans[N];int find(int x){ return fa[x] == x ? x : fa[x] = find(fa[x]);}int main(int argc, char *...
分类:
其他好文 时间:
2014-07-15 08:48:35
阅读次数:
214
Two SumGiven 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...
分类:
其他好文 时间:
2014-07-15 08:45:17
阅读次数:
236
决定终结这个问题!(网上要想找到完整的解答实在太难了)http://blog.sciencenet.cn/blog-676535-541444.html 前两天手贱,把虚拟机玩崩溃了,只好重装虚拟机,把以前的工作再做一遍。在安装好qt-creator之后,编译程序遇到了下面这个错误 cannot.....
分类:
其他好文 时间:
2014-07-14 15:29:25
阅读次数:
341
3Sum ClosestGiven an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three int...
分类:
其他好文 时间:
2014-07-14 15:23:22
阅读次数:
171
4SumGiven an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the sum...
分类:
其他好文 时间:
2014-07-14 15:02:09
阅读次数:
228
Combination SumGiven a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thes...
分类:
其他好文 时间:
2014-07-14 10:43:07
阅读次数:
222
Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
Find and list all four-digit numbers in decimal notation that have the property ...
分类:
其他好文 时间:
2014-07-13 18:17:24
阅读次数:
198