码迷,mamicode.com
首页 >  
搜索关键字:codechef    ( 298个结果
codechef Chef and The Right Triangles 题解
Chef and The Right TrianglesThe Chef is given a list ofN triangles. Each triangle is identfied by the coordinates of its three corners in the 2-D cart...
分类:其他好文   时间:2014-07-14 00:51:29    阅读次数:198
codechef Closing the Tweets 题解
单点更新的题目,记录一个开关数组就可以了。 这里使用bitset来做,bitset是非常好的容器。 最好还是不使用memset吧,因为memset只是清零,要赋予一定值的话,就可能会出错。...
分类:其他好文   时间:2014-06-08 10:53:13    阅读次数:238
codechef Jewels and Stones 题解
Soma is a fashionable girl. She absolutely loves shiny stones that she can put on as jewellery accessories. She has been collecting stones since her c...
分类:其他好文   时间:2014-06-05 19:23:48    阅读次数:310
codechef - Bytelandian gold coins 题解
本题使用动态规划法, 或者记忆法,加上递归法。 不加上递归法,好像很麻烦,因为我们不知道其初始值,只知道其最终值,所以只能往下递推了,这样使用记忆法就比动态规划要方便了。 使用二维表设计其递归记忆表,防止重复计算。还是十分困难的,动态规划法有时候不一定比记忆法要好。 递归记忆法的学名: top-down with memoization; Introduction to Algorithm的Dynamic programming 这章有介绍...
分类:其他好文   时间:2014-06-02 23:04:24    阅读次数:397
codechef : Marbles 题解
本题是一题组合数学的题目。应用到比较高级一点的数学知识。 可以认为是一题indistinguishable objects to distinguishable boxes 把相同的物体放进不同盒子的问题。 这样应用公式是:C(n, n+k-1) = C(k-1, n+k-1),n代表物体k代表盒子 但是因为需要每个盒子最少必须放置一个物体,故此减去每个盒子的这一个球,就得到公式:C(k-1, n+k-1-k) 这样就可以简化为计算一个公式的问题了。 注意: 这里是相同物体放进不同盒子,所以比较简单,注意区...
分类:其他好文   时间:2014-06-01 06:22:45    阅读次数:309
codechef Chef and The Right Triangles 题解
Chef and The Right Triangles The Chef is given a list of N triangles. Each triangle is identfied by the coordinates of its three corners in the 2-D cartesian plane. His job is to figure out how m...
分类:其他好文   时间:2014-05-07 16:28:35    阅读次数:314
codechef The Morning Commute 题解
The Morning Commute The Chef commutes to work every day using the city's underground metro. The schedule for the trains has recently been changed and he wants to know how long it will take to tra...
分类:其他好文   时间:2014-05-07 15:37:11    阅读次数:406
codechef Arranging Cup-cakes题解
Arranging Cup-cakes Our Chef is catering for a big corporate office party and is busy preparing different mouth watering dishes. The host has insisted that he serves his delicious cupcakes for de...
分类:其他好文   时间:2014-05-07 12:34:21    阅读次数:396
codechef Little Elephant and Bombs题解
The Little Elephant from the Zoo of Lviv currently is on the military mission. There are N enemy buildings placed in a row and numbered from left to right strating from 0. Each building i (except the ...
分类:其他好文   时间:2014-05-07 11:49:37    阅读次数:390
codechef Recipe Reconstruction 题解
Chef had an interesting dream last night. He dreamed of a new revolutionary chicken recipe. When he woke up today he tried very hard to reconstruct the ingredient list. But, he could only remember cer...
分类:其他好文   时间:2014-05-07 11:23:54    阅读次数:330
298条   上一页 1 ... 25 26 27 28 29 30 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!