码迷,mamicode.com
首页 >  
搜索关键字:nyoj 630 problem of    ( 39118个结果
nyoj--Divideing Jewels
题意:有十种珠宝用数字表示,现在给你每个珠宝的数量,问可不可以平均分给两个人。解题思路:DFS搜索可以写。将完全背包问题转换为搜索问题。具体代码:#include#include#includeusing namespace std;int num[15],sum;bool dfs(int n,in...
分类:其他好文   时间:2014-05-22 03:26:34    阅读次数:206
poj 1141 Brackets Sequence(区间DP)
题目:http://poj.org/problem?id=1141转载:http://blog.csdn.net/lijiecsu/article/details/7589877定义合法的括号序列如下:1 空序列是一个合法的序列2 如果S是合法的序列,则(S)和[S]也是合法的序列3 如果A和B是合...
分类:其他好文   时间:2014-05-22 02:52:11    阅读次数:256
14.约瑟夫环问题
Josephus problem.
分类:其他好文   时间:2014-05-22 01:33:47    阅读次数:230
hdu1022 train problem 栈的应用
#include #include #include using namespace std;int main(){ int n; while(cin >> n) { stack one; string od1,od2; bool stat...
分类:其他好文   时间:2014-05-21 23:48:58    阅读次数:370
nyoj___大数阶乘
http://acm.nyist.net/JudgeOnline/problem.php?pid=28大数阶乘时间限制:3000 ms | 内存限制:65535 KB难度:3描述我们都知道如何计算一个数的阶乘,可是,如果这个数很大呢,我们该如何去计算它并输出它?输入输入一个整数m(0 2 #incl...
分类:其他好文   时间:2014-05-21 22:15:52    阅读次数:392
Is It A Tree?------HDOJ杭电1325(两种方法,可以用也可以不用并查集!!!!!!详解)
Problem Description A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the follow...
分类:其他好文   时间:2014-05-21 10:55:57    阅读次数:325
hdu 1171 Big Event in HDU 多重背包
Big Event in HDU Problem Description Nowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College had ever been split into Comp...
分类:其他好文   时间:2014-05-21 10:51:55    阅读次数:300
HDU FATE (完全背包+有限取次)(二重费用背包)
FATE Problem Description 最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产...
分类:其他好文   时间:2014-05-21 10:16:18    阅读次数:194
[ACM] hdu 2717 Catch That Cow (BFS)
Catch That Cow Problem Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number li...
分类:其他好文   时间:2014-05-21 07:02:40    阅读次数:312
nyoj--幸运三角形
题意:幸运三角形时间限制:1000ms | 内存限制:65535KB难度:3描述 话说有这么一个图形,只有两种符号组成(‘+’或者‘-’),图形的最上层有n个符号,往下个数依次减一,形成倒置的金字塔形状,除第一层外(第一层为所有可能情况),每层形状都由上层决定,相邻的符号相同,则下层的符号为‘...
分类:其他好文   时间:2014-05-21 03:17:06    阅读次数:268
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!