`
zqynux
  • 浏览: 36352 次
  • 性别: Icon_minigender_1
  • 来自: 湖南
社区版块
存档分类
最新评论
文章列表
Cow Tours Farmer John has a number of pastures on his farm. Cow paths connect some pastures with certain other pastures, forming a field. But, at the present time, you can find at least two pastures that cannot be connected by any sequence of cow paths, thus partitioning Farmer John's farm into mult ...
USACO 2.4 Overfencing 穿越栅栏 Overfencing Kolstad and Schrijvers Farmer John went crazy and created a huge maze of fences out in a field. Happily, he left out two fence segments on the edges, and thus created two "exits" for the maze. Even more happily, the maze he created by this overfencing ...
The Tamworth Two BIO '98 - Richard Forster A pair of cows is loose somewhere in the forest. Farmer John is lending his expertise to their capture. Your task is to model their behavior. The chase takes place on a 10 by 10 planar grid. Squares can be empty or they can contain: an obstacle, the co ...
Controlling Companies Some companies are partial owners of other companies because they have acquired part of their total shares of stock. For example, Ford owns 12% of Mazda. It is said that a company A controls company B if at least one of the following conditions is satisfied: Company A = Compa ...
Broken Necklace You have a necklace of N red, white, or blue beads (3<=N<=350) some of which are red, others blue, and others white, arranged at random. Here are two examples for n=29:                 1 2                               1 2             r b b r                           b r r b ...
Money Systems The cows have not only created their own government but they have chosen to create their own money system. In their own rebellious way, they are curious about values of coinage. Traditionally, coins come in values like 1, 5, 10, 20 or 25, 50, and 100 units, sometimes with a 2 unit coin ...
Farmer John is considering purchasing a new herd of cows. In this new herd, each mother cow gives birth to two children. The relationships among the cows can easily be represented by one or more binary trees with a total of N (3 <= N < 200) nodes. The trees have these properties: The degree o ...
Zero Sum Consider the sequence of digits from 1 through N (where N=9) in increasing order: 1 2 3 ... N. Now insert either a `+' for addition or a `-' for subtraction or a ` ' [blank] to run the digits together between each pair of digits (not in front of the first digit). Calculate the result that ...
Longest Prefix IOI'96 The structure of some biological objects is represented by the sequence of their constituents denoted by uppercase letters. Biologists are interested in decomposing a long sequence into shorter ones called primitives. We say that a sequence S can be composed from a given set ...
描述 Description        某校的惯例是在每学期的期末考试之后发放奖学金。发放的奖学金共有五种,获取的条件各自不同:   1)  院士奖学金,每人8000元,期末平均成绩高于80分(>80),并且在本学期内发表1篇或1篇以上论文的学生均可获得;   2)  五四奖学金,每人4000元,期末平均成绩高于85分(>85),并且班级评议成绩高于80分(>80)的学生均可获得;   3)  成绩优秀奖,每人2000元,期末平均成绩高于90分(>90)的学生均可获得;   4)  西部奖学金,每人1000元,期末平均成绩高于85分(>85)的 ...
USACO 2.2 Subset Sums集合   For many sets of consecutive integers from 1 through N (1 <= N <= 39), one can partition the set into two sets whose sums are identical. For example, if N=3, one can partition the set {1, 2, 3} in one way so that the sums of both subsets are identical: {3} and {1, ...
Packing Rectangles 铺放矩形块 (IOI 95) 在网上看了挺多解释这一题的文章,总感觉没看大懂,所以自己写一篇文章吧。希望能够帮助大家理解一下这一题。题目如下: http://www.nocow.cn/index.php/Translate:USACO/packrec 开始拿到题目确实没怎么看懂,网上也有很多人说它是个水题,我倒感觉不以为然,我看了一些网上的人写的代码,说它是水题的人都是怎么写的。整个程序框架就是第一种情况循环+判断,第二种情况循环+判断,…………(以此类推) 接下来我来说下我的做法,(我的语言表达能力却是不强,可能会看不懂,所以如果你看不懂分析 ...
  这几天围着素数统计这一题就把我搞蒙了.. 题目是这样的: 输入一个整数n, 输出小于等于n的素数个数..   刚开始, 觉得题目挺容易的,, 马上写了一个程序出来, 测试了一下, 结果没错.. 急急忙忙的就提交了,, 后来再把题目仔 ...
  哎呀, 首先为自己的空间开张庆祝一下吧`` 还挺开心的, zqynux 这名字儿没人用, 以后我就用这名字了, 一个呢是代表我的名字, zqy, 后面nux就和 Linus 的Linux 一样的, 属于自恋的类型吧.. 如果以后我就机会写操作系统的话, 一定要 ...
Global site tag (gtag.js) - Google Analytics