码迷,mamicode.com
首页 >  
搜索关键字:algorithm    ( 11758个结果)
HDU-4288-Coder(线段树)
Problem Description   In mathematics and computer science, an algorithm describes a set of procedures or instructions that define a procedure. The term has become increasing popular since the adven...
分类:其他好文   时间:2014-08-25 22:54:25    阅读次数:408
CF-85D-Sum of Medians(线段树)
In one well-known algorithm of finding the k-th order statistics we should divide all elements into groups of five consecutive elements and find the median of each five. A median is called the middl...
分类:其他好文   时间:2014-08-25 22:50:55    阅读次数:297
hdoj 3046 Pleasant sheep and big big wolf 【入门最小割】
题目:hdoj 3046 Pleasant sheep and big big wolf 题意:一个矩阵,1表示羊,2表示狼,然后让把羊和狼隔开,问需要最小的栅栏、 分析:标准的最小割 最小割:一个图中,删去容量最小的边使得从 s 到 t 没有路径。 最小割 = 最大流 建图: 首先编号 相邻点建边 1  s 到 羊 无穷 t 到 狼 无穷 (这个题目数据比较水...
分类:其他好文   时间:2014-08-25 21:16:54    阅读次数:359
hdoj 3338 Kakuro Extension 【经典最大流+输出流量】
题目:hdoj 3338 Kakuro Extension 定义:神级最大流(各种错误无数次,整整一天) 题意:一个游戏,这个游戏给出一个矩阵,有些矩阵里面有两个数,前面一个数表示从下一行到下一个出现数字行的所有数字和(当前这一列),而第二个数表示从下一列到下一个出现数字的列(当前这一行),让你填入满足条件的数字的矩阵(1---9),可以重复(最大流条件)。 分析:首...
分类:其他好文   时间:2014-08-25 19:16:14    阅读次数:270
PS 滤镜算法原理——曝光过度
clc; clear all; addpath('E:\PhotoShop Algortihm\Image Processing\PS Algorithm'); Image=imread('4.jpg'); Image=double(Image); Image_inverse=255-Image; [row,col,layer]=size(Image); Imag...
分类:其他好文   时间:2014-08-25 15:03:04    阅读次数:219
POJ 2421 Constructing Roads
来源:http://poj.org/problem?id=2421 Constructing Roads Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 19645   Accepted: 8193 Description There are ...
分类:其他好文   时间:2014-08-25 11:52:07    阅读次数:189
Machine Learning—The k-means clustering algorithm
印象笔记同步分享:Machine Learning—The k-means clustering algorithm...
分类:其他好文   时间:2014-08-25 11:51:44    阅读次数:173
求二叉树中和为给定值的所有路径
转自:http://blog.csdn.net/lalor/article/details/7614381问题定义: You are given a binary tree in which each node contains a value. Design an algorithm to ...
分类:其他好文   时间:2014-08-25 11:20:04    阅读次数:292
hdoj 1569 方格取数 【最大点权独立集->最大流】
题目:hdoj 1569 方格取数 题意:中文题目,就不说题意了。 分类:最大流 |  dp 分析:dp的话应该是个数塔模型,不难做,这里讲转化为图的做法。 这个题目的关键在于转化为一个二分图,来求一个二分图的最大点权独立集,而最大点权独立集 = 点权和 - 最小点权覆盖 最小点权覆盖: 从x或者y集合中选取一些点,使这些点覆盖所有的边,并且选出来的点的权值尽可能...
分类:其他好文   时间:2014-08-24 20:56:13    阅读次数:276
[LeetCode] First Missing Positive
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 s...
分类:其他好文   时间:2014-08-24 20:47:42    阅读次数:214
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!