码迷,mamicode.com
首页 >  
搜索关键字:c. dzy loves sequences    ( 1332个结果
HDU-4879-ZCC loves march(map+set+并查集)
Description On a m*m land stationed n troops, numbered from 1 to n. The i-th troop's position can be described by two numbers (xi,yi) (1 Then there are t minutes, in each minute one of the followi...
分类:其他好文   时间:2014-07-28 16:25:13    阅读次数:356
Codeforces 371C Hamburgers
Description Polycarpus loves hamburgers very much. He especially adores the hamburgers he makes with his own hands. Polycarpus thinks that there are only three decent ingredients to make hamburgers...
分类:其他好文   时间:2014-07-28 00:07:29    阅读次数:363
HDU 4879 ZCC loves march (2014多校2-1008,数据结构,STL,模拟题)
题目:http://acm.hdu.edu.cn/showproblem.php?pid=4879题意:给一个n*m的矩阵,有n个人,t次操作,操作有以下两种:1、令编号x的人上下左右移动2、令与编号x的人同行同列的人聚集到x这里,输出花费方法:使用两个set,一个维护x轴,一个维护y轴一个map,...
分类:其他好文   时间:2014-07-27 10:47:42    阅读次数:294
kmp
Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 #includeintnext[10005];ints[1000005],p[10005];intn,m;void...
分类:其他好文   时间:2014-07-26 13:46:34    阅读次数:297
HDU4876:ZCC loves cards
Problem Description ZCC loves playing cards. He has n magical cards and each has a number on it. He wants to choose k cards and place them around in any order to form a circle. He can choose any se...
分类:其他好文   时间:2014-07-26 03:02:26    阅读次数:289
HDOJ 4876 ZCC loves cards
枚举组合,在不考虑连续的情况下判断是否可以覆盖L...R,对随机数据是一个很大的减枝. 通过检测的暴力计算一遍 ZCC loves cards Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1346    Acc...
分类:其他好文   时间:2014-07-26 02:03:46    阅读次数:248
HDU 4873 ZCC Loves Intersection(JAVA、大数、推公式)
在一个D维空间,只有整点,点的每个维度的值是0~n-1 。现每秒生成D条线段,第i条线段与第i维度的轴平行。问D条线段的相交期望。生成线段[a1,a2]的方法(假设该线段为第i条,即与第i维度的轴平行)为,i!=j时,a1[j]=a2[j],且随机取区间[0,n-1]内的整数。然后a1[i],a2[...
分类:编程语言   时间:2014-07-25 19:10:12    阅读次数:290
JAVA hdu 4882 ZCC Loves Codefires
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=4882题解:参考题后Discuss javaherongwei的讲解考察序列中相邻的两题i, j(i在前)。交换它们后,解出它们之前的题目所带来的时间对答案的贡献是不变的,它们对它们后面的题目的贡献也是不...
分类:编程语言   时间:2014-07-25 14:19:21    阅读次数:256
HDU 4876 ZCC loves cards
我决定记录下这么恶心的代码。比赛的时候头晕脑胀,写得好搓,错的地方好多好多,回来调了好久。。。。做法大概就是C(20,6)选出卡牌后,再k!枚举排列,再k*k得出该排列能得出什么数字。当然,光这样做绝对会T,里面加了各种剪枝后就1650ms险过了。。最主要的剪枝是选出k张牌后,看牌能不能组成L~an...
分类:其他好文   时间:2014-07-25 14:18:01    阅读次数:271
HDU 4882 ZCC Loves Codefires(贪心)
?? ZCC Loves Codefires Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 223    Accepted Submission(s): 123 Problem Description Thou...
分类:其他好文   时间:2014-07-25 11:25:01    阅读次数:171
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!