码迷,mamicode.com
首页 >  
搜索关键字:josephs problem    ( 37568个结果
HDU 4512 吉哥系列故事——完美队形(LCIS)
Problem Description 吉哥这几天对队形比较感兴趣。 有一天,有n个人按顺序站在他的面前,他们的身高分别是h[1], h[2] ... h[n],吉哥希望从中挑出一些人,让这些人形成一个新的队形,新的队形若满足以下三点要求,则称之为完美队形: 1、挑出的人保持他们在原队形的...
分类:其他好文   时间:2014-05-12 16:15:48    阅读次数:217
HDU 4513 吉哥系列故事——完美队形II(Manacher)
Problem Description 吉哥又想出了一个新的完美队形游戏! 假设有n个人按顺序站在他的面前,他们的身高分别是h[1], h[2] ... h[n],吉哥希望从中挑出一些人,让这些人形成一个新的队形,新的队形若满足以下三点要求,则就是新的完美队形: 1、挑出的人保持原队形的相对顺...
分类:其他好文   时间:2014-05-10 19:42:07    阅读次数:309
An Unfair Game-[ACdream1035]
Problem DescriptionThere are n people and n target, everyone should get one target, no two people get the same target, the last one who get the target...
分类:其他好文   时间:2014-05-06 09:00:51    阅读次数:354
UPC 2224 Boring Counting (离线线段树,统计区间[l,r]之间大小在[A,B]中的数的个数)
题目链接:http://acm.upc.edu.cn/problem.php?id=2224题意:给出n个数pi,和m个查询,每个查询给出l,r,a,b,让你求在区间l~r之间的pi的个数(A#include #include #include #include #define lson rt>1;...
分类:其他好文   时间:2014-05-06 08:53:03    阅读次数:248
HDU 3308 LCIS(线段树)
Problem DescriptionGiven n integers.You have two operations:U A B: replace the Ath number by B. (index counting from 0)Q A B: output the length of the...
分类:其他好文   时间:2014-05-06 01:20:33    阅读次数:332
CSU 1416 Practical Number
原题链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1416 结论题,具体判断方法请点击这个网址。 筛素数是肯定的,但一开始定的范围太大了,想当然要筛到10^9的质数,但仔细想想,只要到sqrt(10^9)就可以了,最后的那一个质数是最...
分类:其他好文   时间:2014-05-02 13:41:45    阅读次数:448
UVA之11292 Dragon of Loowater
Problem C: The Dragon of Loowater Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem. The shores of Rellau Creek in central Loowater had always been a prime...
分类:其他好文   时间:2014-05-02 10:07:09    阅读次数:402
Balanced Binary Tree
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth...
分类:其他好文   时间:2014-05-02 07:05:08    阅读次数:311
HDU 4735 DLX爆搜
Little Wish~ lyrical step~ Time Limit: 5000/2500 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 417    Accepted Submission(s): 109 Problem Description N chi...
分类:其他好文   时间:2014-05-02 04:37:42    阅读次数:393
HDU 2828 DLX搜索
Lamp Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 771    Accepted Submission(s): 230 Special Judge Problem Description There are seve...
分类:其他好文   时间:2014-05-02 02:38:38    阅读次数:443
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!