2013年3月15日

USACO3.4.2--American Heritage

摘要: American HeritageFarmer John takes the heritage of his cows very seriously. He is not, however, a truly fine bookkeeper. He keeps his cow genealogies as binary trees and, instead of writing them in graphic form, he records them in the more linear `tree in-order' and `tree pre-order' notation 阅读全文

posted @ 2013-03-15 17:19 仗剑奔走天涯 阅读(244) 评论(0) 推荐(0) 编辑

USACO3.4.3--Electric Fence

摘要: Electric FenceDon PieleIn this problem, `lattice points' in the plane are points with integer coordinates.In order to contain his cows, Farmer John constructs a triangular electric fence by stringing a "hot" wire from the origin (0,0) to a lattice point [n,m] (0<=;n<32000, 0<m 阅读全文

posted @ 2013-03-15 01:23 仗剑奔走天涯 阅读(242) 评论(0) 推荐(0) 编辑

USACO3.4.4--Raucous Rockers

摘要: Raucous RockersYou just inherited the rights to N (1 <= N <= 20) previously unreleased songs recorded by the popular group Raucous Rockers. You plan to release a set of M (1 <= M <= 20) compact disks with a selection of these songs. Each disk can hold a maximum of T (1 <= T <= 20) 阅读全文

posted @ 2013-03-15 00:35 仗剑奔走天涯 阅读(213) 评论(0) 推荐(0) 编辑

导航