Search a 2D Matrix
Total Accepted: 18506 Total
Submissions: 59402My Submissions
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following pr...
分类:
其他好文 时间:
2014-09-05 18:21:38
阅读次数:
232
用Java语言实现的各种排序,包括插入排序、冒泡排序、选择排序、Shell排序、快速排序、归并排序、堆排序、SortUtil等。插入排序:package org.rut.util.algorithm.support;import org.rut.util.algorithm.SortUtil;/*....
分类:
编程语言 时间:
2014-09-05 17:57:31
阅读次数:
204
Given an unsorted integer array, find the first missing positive integer. For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm sh...
分类:
其他好文 时间:
2014-09-05 17:47:51
阅读次数:
150
题目来源:http://poj.org/problem?id=1988
Cube Stacking
Time Limit: 2000MS
Memory Limit: 30000K
Total Submissions: 19173
Accepted: 6693
Case Time Limit: 1000MS
...
分类:
其他好文 时间:
2014-09-05 13:01:34
阅读次数:
195
Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l...
分类:
其他好文 时间:
2014-09-05 12:37:51
阅读次数:
215
题目来源:http://poj.org/problem?id=1182
食物链
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 45355
Accepted: 13229
Description
动物王国中有三类动物A,B,C,这三类动物的...
分类:
其他好文 时间:
2014-09-05 11:22:51
阅读次数:
220
题目来源:https://www.vijos.org/p/1443
P1443银河英雄传说
Accepted
标签:NOI2002[显示标签]
描述
公元五八○一年,地球居民迁移至金牛座α第二行星,在那里发表银河联邦创立宣言,同年改元为宇宙历元年,并开始向银河系深处拓展。
宇宙历七九九年,银河...
分类:
其他好文 时间:
2014-09-05 11:22:11
阅读次数:
224
There are N children standing in a line. Each child is assigned a rating value.
You are giving candies to these children subjected to the following requirements:
Each child must have at least on...
分类:
其他好文 时间:
2014-09-04 23:43:20
阅读次数:
184
题目:hdoj 4971 A simple brute force problem.
题意:给出 n 个任务和 m 项技术,完成某个任务需要其中几项技术,完成某个任务有奖金,学习某个技术需要钱,技术之间有父子关系,某项技术可能需要先学习其他技术,然后问你选择做那些任务获得收益最大?
分析:看题意的黑体字部分,就是一个标准的闭合权问题,这个题目的关键忽悠点在于技术之间的关系,导...
分类:
其他好文 时间:
2014-09-04 22:22:00
阅读次数:
253
题意:
有若干罪犯抢银行,要求逃出地图时他们的路线不相交,求是否能达到上述要求。
分析:
路线不相交即每个点每条边只能用一次,即容量为1,点上的流量限制拆点即可。源点连向罪犯所在位置的入点,最外一圈的出点连向汇点,满流即可能。...
分类:
其他好文 时间:
2014-09-04 22:18:20
阅读次数:
354