USACO 2.3 Controlling Companies 控制公司 解题报告
Controlling Companies
Some companies are partial owners of other companies because they have acquired part of their total shares of stock. For examp[......]
Controlling Companies
Some companies are partial owners of other companies because they have acquired part of their total shares of stock. For examp[......]
The Tamworth Two
BIO \'98 - Richard Forster
A pair of cows is loose somewhere in the forest. Farmer John is lending his expertise to their capt[......]
Cow Tours
Farmer John has a number of pastures on his farm. Cow paths connect some pastures with certain other pastures, forming a field. But, at the[......]
USACO 2.4 Overfencing 穿越栅栏
Overfencing
Kolstad and Schrijvers
Farmer John went crazy and created a huge maze of fences out in a field. Happily, he[......]
USACO 2.2 Subset Sums集合
For many sets of consecutive integers from 1 through N (1 <= N <= 39), one can partition the set into two sets whose sum[……]
Packing Rectangles 铺放矩形块 (IOI 95)
在网上看了挺多解释这一题的文章,总感觉没看大懂,所以自己写一篇文章吧。希望能够帮助大家理解一下这一题。题目如下:
http://www.nocow.cn/index.php/Translate:USACO/packrec
开始拿到题[……]
这题很简单,一位一位算就是,唯一要注意的就是mod 11 = 10的时候,要用X。代码:
C语言:
#include <stdio.h>
#include <ctype.h>
char isbn[14];
char getint(void)
{
static int i[......]
不知道这题该属于哪个类别,,贪心?枚举?反正不难,,代码:
C语言:
#include <stdio.h>
int main(void)
{
int i;
int a, b;
int ans = 0, t = 0;
for(i = 1; i <= 7; i++){
sc[......]
这题不会做,那你就应该砸机子了。
C语言:
#include <stdio.h>
int main(void)
{
int i, j;
scanf(%d%d, &i, &j);
printf(%d\\n, i + j);
return 0;
}
[……]