比赛时间:周五 17:00----周六 17:000(时间很长的.先睡个觉,再出去逛一下都来的及)
比赛题目:
分两组:
基础题:(适合新人们动动脑.高手估计只要动动手就OK了.题目程序都不长.)
http://yzfy.org/bbs/forumdisplay.php?fid=12
分别是以bccn18做前缀的那个三个题目(也就是扇形面积,疯狂世界杯,逆序数2).
我选了几个最近做过的三个题目.把题目描述改成中文之后直接拿我提交通过的程序做标程.然后随机弄了些数据来给大家做.题目的一些陷阱都去掉了.(所以我也没有办法保证我的程序没有漏洞.本来想把测试地点直接放到OJ上去.发现太分散了.所以干脆借用一下某人的OJ,比赛结束之后也能相互看到别人的程序.方便大家提高嘛).
提高题:
哎!.是两个我不会的题目.希望高手来帮忙:
第一题:
http://acm.jlu.edu.cn/joj/showproblem.php?pid=2438
Level Up
--------------------------------------------------------------------------------
Status In/Out TIME Limit MEMORY Limit Submit Times Solved Users JUDGE TYPE
stdin/stdout 10s 32768K 173 19 Standard
The warrior will go through a labyrinth to help his princess. There are different kind of room in the labyrinth. The room may be block or empty. In other case, there are small or large monster in the room. At first, the warrior can only defeat the small monster but not large. After kill a certain number of small monsters, the capability of warrior will upgrade to defeat large monster.
The hero can move up, down, left or right. His objective is to go through the labyrinth quickly although some monster should be killed. Can you find the best path when the map of labyrinth is given? Of course, the dead monster can't revive.
Input
The first line of each case are the width and height of maze m,n (m,n <=8), and the integer k that is the number of monster should be killed to upgrade. At the next m lines, a string with length n is given to describle the labyrinth. In each string, a letter '.' means empty room, letter '#' means block room, the lowercase 'o' means small monster and uppercase 'O' means large monster. The entey of maze is left-top, and the exit is right-bottom.
Output
Output the best step in one line for each case. If there is no route, output -1.
Sample Input
4 4 3
o...
....
o.OO
o#O.
Sample Output
9
翻译一下:
第一题其实就是一个迷宫类似.就象我们warcraft一样开始英雄没有什么等级所以只能打小怪物.等升了之后才能打大的.题目就是一个8*8的格子.你的英雄在左上角.你要到左下角去.'.'代表没有怪物,'o'代表有小怪,'O'代表大怪,杀大怪必须至少杀k个小怪升级才能杀。'#'代表的是不能走的石头,
第二题:
http://acm.whu.edu.cn/oak/problem/problem.jsp?problem_id=1268
Problem 1268 - Game of Connections
Time Limit:1000MS Memory Limit:65536KB
Total Submit:15 Accepted:7
DescriptionThis is a small but ancient game. You are supposed to write down the numbers 1, 2, 3, . . . , 2n - 1, 2n consecutively in clockwise order on the ground to form a circle, and then, to draw some straight line segments to connect them into number pairs. Every number must be connected to exactly one another.
And, no two segments are allowed to intersect.
It's still a simple game, isn't it? But after you've written down the 2n numbers, can you tell me in how many different ways can you connect the numbers into pairs? Life is harder, right?
InputEach line of the input file will be a single positive number n, except the last line, which is a number -1.
You may assume that 1 <= n <= 100.
OutputFor each n, print in a single line the number of ways to connect the 2n numbers into pairs.
Sample Input
2
3
-1
Sample Output
2
5
翻译:
把1到2n按照顺序顺时针摆好.然后用线把两个数字连接起来,要求线段不能相交.问有多少种连接方法.每个数字只能连接一个数字
第一题当时比赛的时候也就3个人过了.后来我写了好多次都过不了.第二个应该是DP.可怜我水平烂还是不会.
[此贴子已经被作者于2007-9-14 21:56:21编辑过]