USACO
文章平均质量分 72
NJU_SE_WaterWan
这个作者很懒,什么都没留下…
展开
-
USACO Dynamic Programming (1)
首先看一下题目: Introduction Dynamic programming is a confusing name for a programming technique that dramatically reduces the runtime of algorithms: from exponential to polynomial. The basic idea is to try原创 2017-07-19 15:42:17 · 474 阅读 · 0 评论 -
USACO-palsquare 遇到的一个坑
1 /** 2 ID: njuwz151 3 TASK: palsquare 4 LANG: C++ 5 */ 6 #include 7 #include 8 #include 9 10 using namespace std; 11 12 char baseTable[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8',原创 2017-07-19 15:41:26 · 947 阅读 · 0 评论 -
USACO hamming
考试周终于过去了一半,可以继续写USACO了。 先来看一下题目吧。 Hamming CodesRob Kolstad Given N, B, and D: Find a set of N codewords (1 0x554 = 0101 0101 0100 0x234 = 0010 0011 0100 Bit differences: xxx xx Sinc原创 2017-07-19 15:42:05 · 311 阅读 · 0 评论 -
USACO Healthy Holsteins
首先看题目: Healthy HolsteinsBurch & 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原创 2017-07-19 15:41:59 · 660 阅读 · 0 评论 -
USACO Sorting a Three-Valued Sequence
首先来看一下题目: Sorting is one of the most frequently performed computational tasks. Consider the special sorting problem in which the records to be sorted have at most three different key values. This happ原创 2017-07-19 15:41:53 · 661 阅读 · 0 评论 -
USACO Ordered Fractions
首先看一下题目 Consider the set of all reduced fractions between 0 and 1 inclusive with denominators less than or equal to N. Here is the set when N = 5: 0/1 1/5 1/4 1/3 2/5 1/2 3/5 2/3 3/4 4/5 1/1 Write原创 2017-07-19 15:41:47 · 451 阅读 · 0 评论 -
USACO The Castle
首先看一下题目。 The CastleIOI'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 h原创 2017-07-19 15:41:41 · 602 阅读 · 0 评论 -
普及练习场 贪心 [USACO1.3]混合牛奶 Mixing Milk
题目链接题意理解这题我以前写过,就直接掏出了原来的代码。当时我还把题目读错了。这个就只需要根据价格排序就好了。代码/** ID: njuwz151 TASK: milk LANG: C++ */ #include <iostream> #include <cstdio> #include <algorithm>#define MAXN 5000using namespace std;typedef原创 2017-12-15 16:41:31 · 584 阅读 · 0 评论