码迷,mamicode.com
首页 >  
搜索关键字:codechef    ( 298个结果
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 childhood - now she has become really good with ide...
分类:其他好文   时间:2014-05-07 07:38:20    阅读次数:415
codechef Little Elephant and Permutations题解
The Little Elephant likes permutations. This time he has a permutation A[1], A[2], ..., A[N] of numbers 1, 2, ...,N. He calls a permutation A good, if the number of its inversions is equal to the n...
分类:其他好文   时间:2014-05-07 07:20:50    阅读次数:356
Codechef Not a Triangle题解
找出一个数组中的三个数,三个数不能组成三角形。 三个数不能组成三角形的条件是:a + b 两边和小于第三边。 这个问题属于三个数的组合问题了。暴力法可解,但是时间效率就是O(n*n*n)了,很慢。 不过既然是组合问题就必定可以使用排序后处理的方法降低时间效率的。 这里降低时间效率的方法是: 选一个最大的数c,然后选两个小数a和b,其中a 这样可以把时间效率降到O(n*n)...
分类:其他好文   时间:2014-05-07 06:32:23    阅读次数:289
codechef Johnny and the Beanstalk 题解
One evening Johnny found some funny looking beens in his grandfather's garden shed, and decided to plant one of them. Next morning, to his surprise he found an enormous beanstalk growing in his back y...
分类:其他好文   时间:2014-05-07 05:17:42    阅读次数:303
codechef Popular Rice Recipe题解
Popular Rice Recipe Did you know that there are over 40,000 varieties of Rice in the world ? There are so many dishes that can be prepared with Rice too. A famous chef from Mumbai, Tid Gusto prep...
分类:其他好文   时间:2014-05-07 04:05:46    阅读次数:428
codechef Subtraction Game 1题解
Subtraction Game 1 Chef is playing a game on a sequence of N positive integers, say A1, A2, ... AN. The game is played as follows. If all the numbers are equal, the game ends.Otherwise Sele...
分类:其他好文   时间:2014-05-07 03:14:01    阅读次数:280
codechef Correctness of Knight Move题解
Chef develops his own computer program for playing chess. He is at the very beginning. At first he needs to write the module that will receive moves written by the players and analyze it. The module w...
分类:其他好文   时间:2014-05-06 23:11:26    阅读次数:497
Codechef Maximum Weight Difference题解
Maximum Weight Difference Chef has gone shopping with his 5-year old son. They have bought N items so far. The items are numbered from 1 to N, and the item i weighs Wi grams. Chef's son insist...
分类:其他好文   时间:2014-05-06 22:59:49    阅读次数:451
codechef Row and Column Operations 题解
You are given an N × N grid initially filled by zeros. Let the rows and columns of the grid be numbered from1 to N, inclusive. There are two types of operations can be applied to the grid: RowAdd R...
分类:其他好文   时间:2014-05-06 22:35:44    阅读次数:451
codechef Top Batsmen题解
A cricket team consists of 11 players and some are good at batting, others are good at bowling and some of them are good at both batting and bowling. The batting coach wants to select exactly K player...
分类:其他好文   时间:2014-05-06 22:23:32    阅读次数:421
298条   上一页 1 ... 26 27 28 29 30 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!