码迷,mamicode.com
首页 >  
搜索关键字:codechef    ( 298个结果
May Challenge 2015(CodeChef 2015年5月月赛)
Chef and new recipe Rupsa recently started to intern under Chef. He gave her N type of ingredients of varying quantity A1, A2, ..., AN respectively to store it. But as she is lazy to arrange th...
分类:其他好文   时间:2015-05-19 16:46:41    阅读次数:172
codechef Taxi Driver
题意: 给N个点求任意两个点的“距离”总和: A,B的“距离”定义为:min(|ax-bx|,|ay-by|)(n 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 9 #define ll lon...
分类:其他好文   时间:2015-04-23 21:24:38    阅读次数:274
codechef Polo the Penguin and the Tree
一般xor 的题目都是用trie解决。那这道题是在树上的trie;首先:从root==1,遍历树得到1到所有节点的xor 值。 然后对于每个点我们把其插入二进制树中。对于每一个点查找其二进值异或值最大的数 依次遍历下来。注意:边的数量开两倍以上,RE很多次。find函数具体是这样的:对于一个书二进值...
分类:其他好文   时间:2015-04-01 15:11:01    阅读次数:162
【CODECHEF】【phollard rho + miller_rabin】The First Cube
All submissions for this problem are available.Read problems statements in Mandarin Chinese and Russian.This problem's statement is really a short on....
分类:其他好文   时间:2015-03-31 22:09:45    阅读次数:223
CodeChef STRSUB(dp+二分)
题意:(中文题意) https://codechef_shared.s3.amazonaws.com/download/translated/MARCH15/mandarin/STRSUB.pdf 解析: 先预处理一个数组pre[],pre[i]表示i这个位置,往前最多能找到哪个位置是满足0和1都不大于k的。 然后以每个位置i为左区间的长度就可以计算出,为 (r - pre[i] +...
分类:其他好文   时间:2015-03-09 20:58:44    阅读次数:132
CodeChef A String Game(SG)
A String GameProblem code: ASTRGAMESubmitAll SubmissionsAll submissions for this problem are available.Teddy and Tracy like to play a game based on st...
分类:其他好文   时间:2015-02-28 10:12:20    阅读次数:557
Codechef Chef and Churu
Description有一个n个数的数组a,有n个函数,每个函数是返回[li,ri]的和有一个n个数的数组a,有n个函数,每个函数是返回[l_i,r_i]的和有两种操作1 x y:将数组第x个元素值修改为y2 m n:询问[m,n]函数的和n,q≤105n,q\leq10^5Solution我们可以考虑分块,将函数分为n??√块\sqrt{n}块,预处理出每块函数和以及每块函数中每个数算的次数,再用...
分类:其他好文   时间:2015-02-25 21:12:51    阅读次数:165
Codechef Prime Distance On Tree(点分治+FFT)
题外话最近做题发现自己非常SB,总是查一个SB错误查N久,简直绝望啊。。。弱逼为何而战这次是忘记加long long查了N久。。蛋碎无比不过好歹是又做出一道cc hard的题了呢,感人肺腑Description题意很简单:一棵树,问多少个二元组(u,v)(u , v),满足u 到 v的路径长度为素数的概率为多少。所有边长度为11Solution自从重温了下 楼教的男人八题后,这种关于路径长度的题一看...
分类:其他好文   时间:2015-02-24 15:10:26    阅读次数:178
CodeChef 3-Palindromes(Manacher)
3-PalindromesProblem code: PALIN3SubmitAll SubmissionsAll submissions for this problem are available.Read problems statements in Mandarin Chinese and ...
分类:其他好文   时间:2015-02-22 13:22:57    阅读次数:124
CodeChef Mahesh and his lost array
Mahesh and his lost arrayProblem code: ANUMLASubmitAll SubmissionsAll submissions for this problem are available.Read problems statements in Mandarin ...
分类:其他好文   时间:2015-02-22 12:13:33    阅读次数:122
298条   上一页 1 ... 21 22 23 24 25 ... 30 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!