原题地址:https://oj.leetcode.com/problems/container-with-most-water/题意:Givennnon-negative
integersa1,a2, ...,an, where each represents a point at coordina...
分类:
编程语言 时间:
2014-06-10 20:05:44
阅读次数:
213
戳我去解题Givennnon-negative integers representing an
elevation map where the width of each bar is 1, compute how much water it is
able to trap after raini...
分类:
移动开发 时间:
2014-06-10 08:48:04
阅读次数:
267
Description
Problem A
The Most Distant State
Input: standard input
Output: standard output
The 8-puzzle is a square tray in which eight square tiles are placed. The remaining ninth square ...
分类:
其他好文 时间:
2014-06-10 07:59:06
阅读次数:
335
题目:
链接:点击打开链接
思路:
对边排序,再枚举每条边,如果出现通路(findset(x) == findset(y))就结束。
代码:
#include
#include
#include
#include
using namespace std;
#define MAXN 220
#define MAXM 1010
#define MAX ...
分类:
其他好文 时间:
2014-06-10 07:34:46
阅读次数:
237
题目
Given a non-negative number represented as an array of digits, plus one to the number.
The digits are stored such that the most significant digit is at the head of the list.
方法
...
分类:
其他好文 时间:
2014-06-10 06:12:06
阅读次数:
285
题目描述Timy is visiting a beautiful park. There are M
rivers and N lakes(marked 1-N), any two lakes are connected by at most one
river. He knows that the...
分类:
其他好文 时间:
2014-06-09 20:57:26
阅读次数:
259
Recently we looked across some of the most
common behaviors that our community of 25,000 users looked for in their logs
with a particular focus on web...
分类:
其他好文 时间:
2014-06-08 22:19:29
阅读次数:
438
【题目】
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), design an algorithm to find the maximum profit.
...
分类:
其他好文 时间:
2014-06-08 15:11:58
阅读次数:
298
There is no denying theWhat The KD 6is among
the most widely used athletic shoes available. Because of so many great releases
such as the Aunt Gem KD ...
分类:
其他好文 时间:
2014-06-08 01:12:23
阅读次数:
343
Givennnon-negative integersa1,a2, ...,an, where
each represents a point at coordinate (i,ai).nvertical lines are drawn such that
the two endpoints of ...
分类:
其他好文 时间:
2014-06-07 23:03:35
阅读次数:
279