码迷,mamicode.com
首页 >  
搜索关键字:poj 2155 matrix    ( 24430个结果
最小割-poj-2914
Stoer-Wagner 算法 题目大意:有重边的无向图,至少删去多少条边能使其变为非连通图? 分析:传统最小割最大流算法需要枚举汇点,复杂度为O(n^4)以上,故有时会超时。本题用Stoer-Wagner 算法。...
分类:其他好文   时间:2014-05-09 15:23:18    阅读次数:228
poj 1700 Crossing River
Crossing River Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 10218   Accepted: 3859 Description A group of N people wishes to go across a river with only...
分类:其他好文   时间:2014-05-09 14:51:43    阅读次数:257
POJ 2484
A Funny GameTime Limit:1000MSMemory Limit:65536KTotal Submissions:3861Accepted:2311DescriptionAlice and Bob decide to play a funny game. At the beginn...
分类:其他好文   时间:2014-05-09 12:53:42    阅读次数:265
Leetcode:Set Matrix Zeroes
戳我去解题Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.这题还是很简单的,就是有点坑,遍历矩阵的时候,每遇到0的时候,我们不能立即将所在行和列置0,否则,到最后矩阵所有...
分类:其他好文   时间:2014-05-09 08:51:57    阅读次数:253
Leetcode:Search a 2D Matrix
戳我去解题Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted f...
分类:其他好文   时间:2014-05-09 08:27:24    阅读次数:241
简易游戏 2048 制作
// Matrix.h#ifndef MATRIX_H#define MATRIX_H#include#include#include#define rows 4#define cols 4#define L 6using std::ostream;classMatrix{friend ostrea...
分类:其他好文   时间:2014-05-09 07:21:22    阅读次数:353
POJ 3122 Pie 二分答案
Pie Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 9653   Accepted: 3478   Special Judge Description My birthday is coming up and traditionally I'm serv...
分类:其他好文   时间:2014-05-09 06:33:22    阅读次数:343
POJ 3528 hdu 3662 三维凸包模板题
Ultimate Weapon Time Limit: 2000MS   Memory Limit: 131072K Total Submissions: 2007   Accepted: 958 Description In year 2008 of the Cosmic Calendar, the Aliens send a hu...
分类:其他好文   时间:2014-05-09 06:28:01    阅读次数:411
poj 1915 BFS
1 /* 2 题意:国际象棋起点到终点移动的最少步数 3 4 题解:水题,BFS就过了,有人用双向BFS 5 */ 6 #include 7 #include 8 #include 9 10 using namespace std;11 12 int dir[8][2]={-2,1,-1,...
分类:其他好文   时间:2014-05-09 05:34:20    阅读次数:387
poj 1743 Musical Theme(男人八题&后缀数组第一题)
Musical Theme Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 17298   Accepted: 5939 Description A musical melody is represented as a sequence of N (1<=N<=20...
分类:其他好文   时间:2014-05-09 02:46:57    阅读次数:375
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!