USACO
文章平均质量分 79
youzn99
这个作者很懒,什么都没留下…
展开
-
USACO:Factorials
转载自So You Try的博客FactorialsThe factorial of an integer N, written N!, is the product of all the integers from 1 through N inclusive. The factorial quickly becomes very large: 13! is too large转载 2016-01-27 11:55:06 · 267 阅读 · 0 评论 -
USACO : Humble Numbers (丑数)
Humble NumbersFor a given set of K prime numbers S = {p1, p2, ..., pK}, consider the set of all numbers whose prime factors are a subset of S. This set contains, for example, p1, p1p2, p1p1, and原创 2016-01-27 14:33:11 · 647 阅读 · 0 评论 -
USACO : Party Lamps dfs 深搜
这道题目需要把握的关键点便是四种按键方式只有正反两种功效(1=1,1+1=0,1+1+1=1,1+1+1+1=0……),无论按多少次都仅能组合成四种按键按或不按的情况(即2^4=16种),因此仅需要把大于4的情况变成小于等于4的情况,再dfs搜索就可以把所有的可能性列举出来(然后判断是否满足条件、排序)*查重技巧:由于按键的跨度有限,不同按键的特征在前10个(实际上是前4个)就可以体现出来,因原创 2016-01-24 14:41:37 · 428 阅读 · 0 评论 -
USACO: Spinning Wheels
Spinning WheelsEach of five opaque spinning wheels has one or more wedges cut out of its edges. These wedges must be aligned quickly and correctly. Each wheel also has an alignment mark (at 0 degr原创 2016-02-22 10:36:07 · 434 阅读 · 0 评论