上一页 1 2 3 4 5 6 7 8 9 10 ··· 20 下一页
摘要: Problem DescriptionContinuous Same Game is a simple game played on a grid of colored blocks. Groups of two or more connected (orthogonally, not diagonally) blocks that are the same color may be removed from the board. When a group of blocks is removed, the blocks above those removed ones fall down i 阅读全文
posted @ 2013-11-17 20:34 persistent codeants 阅读(196) 评论(0) 推荐(0)
摘要: Problem DescriptionLet's play a card game called Gap.You have 28 cards labeled with two-digit numbers. The first digit (from 1 to 4) represents the suit of the card, and the second digit (from 1 to 7) represents the value of the card.First, you shu2e the cards and lay them face up on the table i 阅读全文
posted @ 2013-11-16 14:07 persistent codeants 阅读(338) 评论(0) 推荐(0)
摘要: Problem DescriptionThe Czech Technical University is rather old — you already know that it celebrates 300 years of its existence in 2007. Some of the university buildings are old as well. And the navigation in old buildings can sometimes be a little bit tricky, because of strange long corridors that 阅读全文
posted @ 2013-11-15 17:58 persistent codeants 阅读(262) 评论(0) 推荐(0)
摘要: Problem DescriptionIgnatius花了一个星期的时间终于找到了传说中的宝藏,宝藏被放在一个房间里,房间的门用密码锁起来了,在门旁边的墙上有一些关于密码的提示信息:密码是一个C进制的数,并且只能由给定的M个数字构成,同时密码是一个给定十进制整数N(0 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 int n,c,m,i,j,cas; 9 struct node 10 { 11 int left,step; 12 string str... 阅读全文
posted @ 2013-11-14 15:10 persistent codeants 阅读(320) 评论(0) 推荐(0)
摘要: Problem Description推箱子是一个很经典的游戏.今天我们来玩一个简单版本.在一个M*N的房间里有一个箱子和一个搬运工,搬运工的工作就是把箱子推到指定的位置,注意,搬运工只能推箱子而不能拉箱子,因此如果箱子被推到一个角上(如图2)那么箱子就不能再被移动了,如果箱子被推到一面墙上,那么箱子只能沿着墙移动.现在给定房间的结构,箱子的位置,搬运工的位置和箱子要被推去的位置,请你计算出搬运工至少要推动箱子多少格.Input输入数据的第一行是一个整数T(1 2 #include 3 #include 4 #include 5 #include 6 7 using namesp... 阅读全文
posted @ 2013-11-14 13:23 persistent codeants 阅读(490) 评论(0) 推荐(0)
摘要: Problem Description在魔方风靡全球之后不久,Rubik先生发明了它的简化版——魔板。魔板由8个同样大小的方块组成,每个方块颜色均不相同,可用数字1-8分别表示。任一时刻魔板的状态可用方块的颜色序列表示:从魔板的左上角开始,按顺时针方向依次写下各方块的颜色代号,所得到的数字序列即可表示此时魔板的状态。例如,序列(1,2,3,4,5,6,7,8)表示魔板状态为:1 2 3 48 7 6 5对于魔板,可施加三种不同的操作,具体操作方法如下:A: 上下两行互换,如上图可变换为状态87654321B: 每行同时循环右移一格,如上图可变换为41236785C: 中间4个方块顺时针旋转一格 阅读全文
posted @ 2013-11-13 11:25 persistent codeants 阅读(731) 评论(0) 推荐(0)
摘要: Problem Description一个规则的实心十二面体,它的 20个顶点标出世界著名的20个城市,你从一个城市出发经过每个城市刚好一次后回到出发的城市。Input前20行的第i行有3个数,表示与第i个城市相邻的3个城市.第20行以后每行有1个数m,m=1.m=0退出.Output输出从第m个城市出发经过每个城市1次又回到m的所有路线,如有多条路线,按字典序输出,每行1条路线.每行首先输出是第几条路线.然后个一个: 后列出经过的城市.参看Sample outputSample Input2 5 201 3 122 4 103 5 81 4 65 7 196 8 174 7 98 10 16 阅读全文
posted @ 2013-11-11 19:12 persistent codeants 阅读(277) 评论(0) 推荐(0)
摘要: Problem DescriptionThe 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 sliding tiles, each with a number from 1 to 15 on it, and all packed into a 4 by 4 frame with one tile missing. Let's call the missing ti 阅读全文
posted @ 2013-11-10 13:33 persistent codeants 阅读(231) 评论(0) 推荐(0)
摘要: Problem DescriptionYou're given an unlimited number of pebbles to distribute across an N x N game board (N drawn from [3, 15]), where each square on the board contains some positive point value between 10 and 99, inclusive. A 6 x 6 board might look like this:The player distributes pebbles across 阅读全文
posted @ 2013-11-10 09:15 persistent codeants 阅读(204) 评论(0) 推荐(0)
摘要: Problem DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in the homework after the deadline, the teacher will reduce his score of the final test, 1 day for 1 poin 阅读全文
posted @ 2013-11-09 20:59 persistent codeants 阅读(216) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 20 下一页