这两道题用递归的解法都很简单,只是稍有不同。下面是AC代码: 1 /** 2 * Given a
binary tree, find its minimum depth. 3 * the minimum depth is the number of
nodes along th...
分类:
其他好文 时间:
2014-05-10 08:47:32
阅读次数:
271
Given two wordsword1andword2, find the minimum
number of steps required to convertword1toword2. (each operation is counted as 1
step.)You have the fol...
分类:
其他好文 时间:
2014-05-10 01:09:28
阅读次数:
325
http://acm.hdu.edu.cn/showproblem.php?pid=1598
1 #include 2 #include 3 #include 4 #define maxn 2000 5 using namespace std; 6
const int inf=1<<30; 7...
分类:
其他好文 时间:
2014-05-05 10:53:38
阅读次数:
344
http://acm.hdu.edu.cn/showproblem.php?pid=1599floyd找最小环。 1 #include 2 #include 3
#include 4 #define maxn 200 5 using namespace std; 6 const int inf...
分类:
其他好文 时间:
2014-05-05 10:52:15
阅读次数:
315
常见错误列表一、编译arm环境的时候:./configure -prefix
$HOME/Qtenv/arm -embedded arm-nomake docs -nomake demo -nomake
examples1、configure完成之后,make出现问题:/usr/bin/ld: ca...
分类:
其他好文 时间:
2014-05-05 09:32:27
阅读次数:
1967
系统背景
电脑型号:Thinkpad X230i
操作系统:win 8.1 中文版 + Ubuntu 13.10 双系统运行
问题描述
在Ubuntu系统下无法打开Win分区,提示以下信息
Unable to Access "WINDOWS"Error mounting /dev/sda3 at /media/dany/Data: Command-line `mount -t "nt...
分类:
数据库 时间:
2014-05-04 17:53:36
阅读次数:
681
??
SQL Server online consultants came across an interesting scenario where one of our client was unable to restore a native SQL Server backup successfully performed from one instance running on M...
分类:
数据库 时间:
2014-05-04 17:42:50
阅读次数:
394
测试中出错出错一# ./helloworld
-qwsQWSServerSocket::init: Function not implementedQWSServerSocket: unable to
create socket.QWSServerPrivate::initServer: serve...
分类:
其他好文 时间:
2014-05-04 09:56:40
阅读次数:
322
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without an...
分类:
其他好文 时间:
2014-05-03 21:35:49
阅读次数:
310
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
class UF
{
private int[] id;
private int count;
public UF(int N)
{
count = N;
id = n...
分类:
编程语言 时间:
2014-05-03 21:21:44
阅读次数:
336