码迷,mamicode.com
首页 >  
搜索关键字:poj 2007 scrambled p    ( 20315个结果
POJ 2241 The Tower of Babylon
DP求解。对Blocks的先按照X降级,再按照Y降级排序,可以转化为最长公共子序列问题,即求子序列权值之和最大。 #include #include #include using namespace std; #define MAX_SIZE 300 struct Block{ int x; int y; int height; }; int nums...
分类:其他好文   时间:2014-06-03 04:39:44    阅读次数:223
poj 2049
Finding Nemo Time Limit: 2000MS   Memory Limit: 30000K Total Submissions: 7373   Accepted: 1715 Description Nemo is a naughty boy. One day he went into the deep sea all b...
分类:其他好文   时间:2014-06-03 03:04:50    阅读次数:348
POJ 2948 Martian Mining
题目大意: NASA在火星发现了一个矿场矩阵。矩阵中的每个单元格都有两种矿Yeyenum和Bloggium。我们知道每个单元格中这两种矿的数量。NASA决定在北边建造Bloggium的矿石精炼厂,在西边建造Yeyenum的矿石精炼厂。于是需要我们把bloggium矿石向北运(行号等于0的方向),把Yeyenum矿石向西运(列号等于0的方向)。但由于矿石的不稳定在建造传送带时有特殊要求。求建造传送...
分类:其他好文   时间:2014-06-03 01:07:22    阅读次数:252
POJ 1038 Bugs Integrated, Inc. 状态压缩DP
题目来源:1038 Bugs Integrated, Inc. 题意:最多能放多少个2*3的矩形 思路:状态压缩DP啊 初学 看着大牛的代码搞下来的  总算搞懂了 接下来会更轻松吧 3进制代表前2行的状态(i行和i-1行)1代表i-1行占位 2代表i行占位 i-1不管有没有占位都不会影响的0代表i行和i-1行都空闲 然后枚举状态dfs更新状态 话说就不能没写深搜了 有点不会了 #incl...
分类:其他好文   时间:2014-06-03 00:51:45    阅读次数:340
poj2243
题目链接: http://poj.org/problem?id=2243 题目: Knight Moves Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10932   Accepted: 6171 Description A friend of you...
分类:其他好文   时间:2014-06-02 23:31:39    阅读次数:290
POJ 1191 棋盘分割
棋盘分割 Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 11938   Accepted: 4207 Description 将一个8*8的棋盘进行如下分割:将原棋盘割下一块矩形棋盘并使剩下部分也是矩形,再将剩下的部分继续如此分割,这样割了(n-1)次后,连同最后剩下...
分类:其他好文   时间:2014-06-02 22:38:14    阅读次数:290
poj 3388 Japanese Puzzle
DescriptionA brand-new Japanese puzzle is coming from the East to strike the world-popular Sudoku game and become an international hit. The rules of t...
分类:其他好文   时间:2014-06-02 20:44:37    阅读次数:303
poj 3101 Astronomy
http://poj.org/problem?id=3101这道题就是求所有分子的最小共倍数和分母的最大公约数。 1 import java.math.BigInteger; 2 import java.util.*; 3 import java.util.Arrays; 4 public clas...
分类:其他好文   时间:2014-06-02 16:48:42    阅读次数:255
poj 3252 Round Numbers
题目链接:http://poj.org/problem?id=3252题意:给出一个二进制区间,求出0的个数不小于1的个数这样的二进制个数解法:数位DP,定义状态dp[len][num_zero][num_one],num_zero 定义为写0的个数。 1 #include 2 #include 3...
分类:其他好文   时间:2014-06-01 12:06:33    阅读次数:191
poj 2769 Reduced ID Numbers(memset使用技巧)
Description T. Chur teaches various groups of students at university U. Every U-student has a unique Student Identification Number (SIN). A SIN s is an integer in the range 0 ≤ s ≤ MaxSIN with MaxS...
分类:其他好文   时间:2014-06-01 07:40:18    阅读次数:248
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!