![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
USACO
shangyu11
这个作者很懒,什么都没留下…
展开
-
usaco2.11The Castle
The Castle IOI'94 - Day 1 In a stroke of luck almost beyond imagination, Farmer John was sent a ticket to the Irish Sweepstakes (really a lottery) for his birthday. This ticket turned out to have o原创 2013-02-20 20:41:14 · 220 阅读 · 0 评论 -
usaco2.33Zero Sum
悲催的题意 看了N久 最后还是让WL帮翻译的 原来空格的意思是多位数 比如2 3 就是23 dfs 枚举所有可能的组合 再保存为0的 再排下序就OK /* ID: your_id_here PROG: zerosum LANG: C++ */ #include #include #include #include #include using namespace st原创 2013-03-01 17:16:48 · 227 阅读 · 0 评论 -
usaco2.24Party Lamps
乱七八糟的写 改着改着就这么过了。。dfs枚举 可以看出每个串前六位跟后面的都是一样的 比较不同也就看前6位就可以了 /* ID: your_id_here PROG: lamps LANG: C++ */ #include #include #include #include #include using namespace std; int f[10],n,c,on原创 2013-02-25 20:29:22 · 209 阅读 · 0 评论 -
usaco2.31Longest Prefix
就是枚举吧 看当前i位置是否能达到 /* ID: your_id_here PROG: prefix LANG: C++ */ #include #include #include #include #include using namespace std; char p[210][12],ss[200010]; int f[200010]; int main()原创 2013-02-27 09:52:54 · 179 阅读 · 0 评论 -
usaco2.23Runaround Numbers
题意看了N久,判断是不是什么循环数 ,符合它的规定就行,模拟 /* ID: your_id_here PROG: runround LANG: C++ */ #include #include #include #include #include using namespace std; long long n; int judge(long long x) {原创 2013-02-25 15:47:24 · 242 阅读 · 0 评论 -
usaco2.22Subset Sums
看懂题意后 立马想到dfs 之后随手写了一个dfs TLE 看了下人家写的才知道是背包 /* ID: your_id_here PROG: subset LANG: C++ */ #include #include #include #include #include using namespace std; int s,sum,n; long long f[50][原创 2013-02-25 13:25:54 · 244 阅读 · 0 评论 -
usaco2.21Preface Numbering
/* ID: your_id_here PROG: preface LANG: C++ */ #include #include #include #include #include using namespace std; int f[15]={1,4,5,9,10,40,50,90,100,400,500,900,1000},num[10]; int co[15][1原创 2013-02-25 10:26:38 · 228 阅读 · 0 评论 -
usaco2.14Hamming Codes
Hamming Codes Rob Kolstad Given N, B, and D: Find a set of N codewords (1 <= N <= 64), each of length B bits (1 <= B <= 8), such that each of the codewords is at least Hamming distance of D (1 <= D原创 2013-02-21 17:13:07 · 278 阅读 · 0 评论 -
usaco2.13Healthy Holsteins(dfs枚举)
Healthy Holsteins Burch & Kolstad Farmer John prides himself on having the healthiest dairy cows in the world. He knows the vitamin content for one scoop of each feed type and the minimum daily vit原创 2013-02-21 14:29:18 · 331 阅读 · 0 评论 -
usaco2.12Sorting a Three-Valued Sequence
Sorting a Three-Valued Sequence IOI'96 - Day 2 Sorting is one of the most frequently performed computational tasks. Consider the special sorting problem in which the records to be sorted have at原创 2013-02-21 11:13:43 · 363 阅读 · 0 评论 -
usaco2.34Money Systems
完全背包 DP就是短 f[i] += f[i-c[i]]; /* ID: your_id_here PROG: money LANG: C++ */ #include #include #include #include using namespace std; long long f[10005]; int c[30]; int main() { fre原创 2013-03-18 20:57:16 · 508 阅读 · 0 评论