There are n SMTP servers connected by network cables. Each of the m cables connects two computers and has a certain latency measured in milliseconds required to send
an email message. What is the sh...
分类:
其他好文 时间:
2014-08-11 21:25:02
阅读次数:
384
Problem Description
This is a simple game.The goal of the game is to roll two balls to two holes each.
'B' -- ball
'H' -- hole
'.' -- land
'*' -- wall
Remember when a ball rolls into a hole, the...
分类:
其他好文 时间:
2014-08-11 21:22:12
阅读次数:
308
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time
complexity should be O(log (m+n)).
public class Solution {
...
分类:
其他好文 时间:
2014-08-11 15:14:12
阅读次数:
188
~~~~
题目意思问将序列 x 转化成序列 y 需要多少步操作。
题目链接:http://poj.org/problem?id=3356
~~~~
我的想法先求的两条序列的最长公共子序列。余下不相同或者是缺少的部分做相应的处理就好。
最长公共子序列都会吧,于是····
#include
#include
#include
#include
#define N 1000+10
using...
分类:
其他好文 时间:
2014-08-11 12:02:32
阅读次数:
238
Treblecross is a two player game where the goal is to get threeXin a row on a one-dimensional board. At the start of the game all cells in the board a...
分类:
其他好文 时间:
2014-08-10 23:50:01
阅读次数:
451
Problem Description
A hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.
You are to find all the hat’s words in a dictionary....
分类:
其他好文 时间:
2014-08-10 18:40:10
阅读次数:
232
Problem E: ExpressionsArithmetic expressions are usually written with the operators in between the two operands (which is called infix notation). For ...
分类:
其他好文 时间:
2014-08-10 18:22:40
阅读次数:
362
Understanding node.jsPosted on 29/4/10 byFelix GeisendörferNode.jshas generally caused two reactions in people I've introduced it to. Basically people...
分类:
Web程序 时间:
2014-08-10 18:12:10
阅读次数:
462
题目:
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
Outpu...
分类:
其他好文 时间:
2014-08-10 13:08:30
阅读次数:
296
Description
Problem F: Tug of War
A tug of war is to be arranged at the local office picnic. For the tug of war, the picnickers must be divided into two teams. Each person must be on one tea...
分类:
其他好文 时间:
2014-08-09 21:37:09
阅读次数:
367