- 博客(20)
- 收藏
- 关注
原创 USACO 1.4 Ski Course Design 翻译&解题报告
Farmer John has N hills on his farm (1 <= N <= 1,000), each with an integer elevation in the range 0 .. 100. In the winter, since there is abundant snow on these hills, FJ routinely operates a s...
2018-07-12 00:39:52 497
原创 USACO 1.4 Wormholes 翻译&解题报告
Farmer John's hobby of conducting high-energy physics experiments on weekends has backfired, causing N wormholes (2 <= N <= 12, N even) to materialize on his farm, each located at a distinct poi...
2018-07-12 00:23:56 611
翻译 Binary Numbers
Representing Binary NumbersComputers operate on 1's and 0's; these are called 'bits'. A byte is a group of 8 bits, like this example: 00110101. A computer word on a 32-bit computer ('int') is 4 bytes,...
2018-07-12 00:11:08 1304
翻译 Search Techniques 搜索技术
Sample Problem: n Queens [Traditional]Place n queens on an n x n chess board so that no queen is attacked by another queen.将n个女王放在nxn棋盘上,使不会有女王被另一个女王攻击。Depth First Search (DFS)The most obvious solutio...
2018-07-10 10:43:52 374
原创 USACO 1.4 Prime Cryptarithm 翻译&amp;amp;解题报告
The following cryptarithm is a multiplication problem that can be solved by substituting digits from a specified set of N digits into the positions marked with *. If the set of prime digits {2,3,5,7} ...
2018-07-05 20:05:07 230
原创 USACO 1.4 Barn Repair 题解&解题报告
It was a dark and stormy night that ripped the roof and gates off the stalls that hold Farmer John's cows. Happily, many of the cows were on vacation, so the barn was not completely full.The cows spen...
2018-07-05 19:57:55 260
原创 USACO 1.4 Mixing Milk 翻译&解题报告
The Merry Milk Makers company buys milk from farmers, packages it into attractive 1- and 2-Unit bottles, and then sells that milk to grocery stores so we can each start our day with delicious cereal a...
2018-07-05 19:39:32 460
原创 PTA 数据结构与算法题目集(中文)6-8 求二叉树高度
6-8 求二叉树高度(20 分)本题要求给定二叉树的高度。函数接口定义:int GetHeight( BinTree BT );其中BinTree结构定义如下:typedef struct TNode *Position;typedef Position BinTree;struct TNode{ ElementType Data; BinTree Left; Bin...
2018-07-01 23:59:07 649
原创 PTA 数据结构与算法题目集(中文)6-9 二叉树的遍历
6-9 二叉树的遍历(25 分)本题要求给定二叉树的4种遍历。函数接口定义:void InorderTraversal( BinTree BT );void PreorderTraversal( BinTree BT );void PostorderTraversal( BinTree BT );void LevelorderTraversal( BinTree BT );其中BinTre...
2018-07-01 23:56:26 594 1
翻译 Crafting Winning Solutions 制作获奖解题方法
Crafting Winning SolutionsA good way to get a competitive edge is to write down a game plan for what you're going to do in a contest round. This will help you script out your actions, in terms of what...
2018-07-01 19:36:35 372
翻译 贪心算法
Greedy AlgorithmSample Problem: Barn Repair [1999 USACO Spring Open]There is a long list of stalls, some of which need to be covered with boards. You can use up to N (1 <= N <= 50) boards, each ...
2018-07-01 19:32:27 493
原创 USACO 1.3 Name That Number 翻译&解题报告
Among the large Wisconsin cattle ranchers, it is customary to brand cows with serial numbers to please the Accounting Department. The cow hands don't appreciate the advantage of this filing system, th...
2018-07-01 19:26:39 394
原创 USACO 1.3 Transformations 翻译&解题报告
A square pattern of size N x N (1 <= N <= 10) black and white square tiles is transformed into another square pattern. Write a program that will recognize the minimum transformation that has bee...
2018-06-30 19:19:09 280
原创 USACO 1.3 Milking Cows 翻译&解题报告
Three farmers rise at 5 am each morning and head for the barn to milk three cows. The first farmer begins milking his cow at time 300 (measured in seconds after 5 am) and ends at time 1000. The second...
2018-06-30 19:03:37 347
原创 USACO 1. 2 Friday the Thirteenth 翻译&amp;解题报告
Is Friday the 13th really an unusual event?That is, does the 13th of the month land on a Friday less often than on any other day of the week? To answer this question, write a program that will compute...
2018-06-30 18:55:46 307
原创 USACO Section1.2 Greedy Gift Givers 翻译&解题报告
Task 'gift1': Greedy Gift GiversA group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends might or might not give some money to some or all of th...
2018-06-26 12:06:35 611
翻译 搜索问题
The IdeaSolving a problem using complete search is based on the ``Keep It Simple, Stupid'' principle. The goal of solving contest problems is to write programs that work in the time allowed, whether o...
2018-06-25 18:32:08 1351
翻译 算法竞赛题型
Hal Burch conducted an analysis over spring break of 1999 and made an amazing discovery: there are only 16 types of programming contest problems! Furthermore, the top several comprise almost 80% of th...
2018-06-25 16:45:21 251
翻译 特设问题
`Ad hoc' problems are those whose algorithms do not fall into standard categories with well-studied solutions. Each ad hoc problem is different; no specific or general techniques exist to solve them.O...
2018-06-25 15:09:43 142
原创 USACO Section1.2 Your Ride is Here 翻译&amp;解题报告
YOUR RIDE IS HERE It is a well-known fact that behind every good comet is a UFO. These UFOs often come to collect loyal supporters from here on Earth. Unfortunately, they only have room to pick up one...
2018-06-25 15:03:02 271
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人