USACO 2.4 Cow Tours 牛的旅行 解题报告
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[......]
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;
}
[……]
开到这个题目,想起了浏览器Lynx,用过两次,太难用了,汗,,貌似跑题了。
整个题目就是要了解一下浏览器的向前向后的特性,浏览器向后几步之后再输入网址就不能够向前浏览了。整个程序我就用一个数组来维护的,额,具体的细节看代码吧:
C语言:
#include <stdio.h>
#incl[......]
这题我就什么都不说了吧,这题不会做你就回去把语言好好学学,学习输入输出的一些空格和换行。
C语言:
#include <stdio.h>
#define getint(i) scanf(%d, &i)
int main(void)
{
int n, i;
int t1, t[......]