随笔分类 - 广搜
摘要:问题描述拼图玩具已经有约235年的历史了。早在1760年,法英两国几乎同时出现这种既流行又有益的娱乐方式。把一张图片粘在硬纸板上,然后把它剪成不规则小碎片。最初这些图片都是有教育意义的,要么附有适于年轻人阅读的短文,要么向新兴资产阶级传授历史或地理知识。1762年,在法国路易十五统治时期,一个名叫迪马的推销商开始推销地图拼图,取得小小成功。这种地图拼图要求把碎片重新排列,是一种文雅的娱乐活动。同年,在伦敦,一位名叫约翰•斯皮尔斯伯里的印刷工也想到了相似的主意,发明了经久不衰的拼图玩具。他极其巧妙地把一幅英国地图粘到一张很薄的餐桌背面,然后沿着各郡县的边缘精确地把地图切割成小块。这一想法能带来巨
阅读全文
摘要:DescriptionYou are given two pots, having the volume ofAandBliters respectively. The following operations can be performed:FILL(i) fill the poti(1 ≤i≤ 2) from the tap;DROP(i) empty the potito the drain;POUR(i,j) pour from potito potj; after this operation either the potjis full (and there may be som
阅读全文
摘要:DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices.— It is a matter of security to change such things every now and then, to keep the enemy in the dark.— But look,
阅读全文
摘要:DescriptionGiven a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than 200 and there is a corresponding m containing no more than 100 decimal digits.InputThe input file may
阅读全文
摘要:DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a pointN(0 ≤N≤ 100,000) on a number line and the cow is at a pointK(0 ≤K≤ 100,000) on the same number line. Farmer John has two modes of transportation: walking and teleporting
阅读全文
摘要:DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south, east, west, up or down. You cannot move diagonally and the maze is surrounded by solid
阅读全文
摘要:Problem DescriptionBenny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot of samll squares. Water pipes are placed in these squares. Different square has a different type of pipe. There are 11 types of pipes, which is marked from A to K, as Figure 1 shows
阅读全文
摘要:胜利大逃亡(续)Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3449Accepted Submission(s): 1111Problem DescriptionIgnatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)……这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的门,钥匙藏在地牢另外的某些地方。刚开始Ignatius被关在(sx,sy)的位置,离开地牢的门在(ex,ey)的位置。I
阅读全文
摘要:1 #include<iostream> 2 #include<queue> 3 using namespace std; 4 int map[51][51][51]; 5 int flag[51][51][51]; 6 int A,B,C,T; 7 int dir[][3]={{0,0,1},{0,1,0},{1,0,0},{0,0,-1},{0,-1,0},{-1,0,0}}; 8 struct node 9 {10 int x,y,z;11 int time;12 };13 void bfs()14 {15 int i;16 flag[0][0][0]=...
阅读全文

浙公网安备 33010602011771号