3-1. 社交友谊(我要搬到温哥华 I'm moving to Vancouver)

原文链接:http://talk.oralpractice.com/article_14586.html

- What are you doing?

- I'm packing. My lease is up at the end of the month and I'm moving to Vancouver for six months

while my girlfriend is finishing his degree at the university.

- Are you moving yourself or are you using a moving company?

- I rent a car and doing it myself. 

I'm putting some of my furniture in storage since I plan to move back 

here after she graduates.

噢,我在整理东西。本月底我房子的租期就要满了,我将要搬到温哥华住上六个月,这段时间我的男友将在大学完成他的学位。

噢,你是自己在搬家还是请了搬家公司?

我从尤豪公司租了辆卡车自己搬。我将我的一些家具寄存起来了,因为我打算男友毕业后还搬回来

 

展开阅读全文

I'm Telling the Truth

11-21

Problem DescriptionnAfter this year’s college-entrance exam, the teacher did a survey in his class on students’ score. There are n students in the class. The students didn’t want to tell their teacher their exact score; they only told their teacher their rank in the province (in the form of intervals).nnAfter asking all the students, the teacher found that some students didn’t tell the truth. For example, Student1 said he was between 5004th and 5005th, Student2 said he was between 5005th and 5006th, Student3 said he was between 5004th and 5006th, Student4 said he was between 5004th and 5006th, too. This situation is obviously impossible. So at least one told a lie. Because the teacher thinks most of his students are honest, he wants to know how many students told the truth at most.n nnInputnThere is an integer in the first line, represents the number of cases (at most 100 cases). In the first line of every case, an integer n (n <= 60) represents the number of students. In the next n lines of every case, there are 2 numbers in each line, Xi and Yi (1 <= Xi <= Yi <= 100000), means the i-th student’s rank is between Xi and Yi, inclusive.nn nnOutputnOutput 2 lines for every case. Output a single number in the first line, which means the number of students who told the truth at most. In the second line, output the students who tell the truth, separated by a space. Please note that there are no spaces at the head or tail of each line. If there are more than one way, output the list with maximum lexicographic. (In the example above, 1 2 3;1 2 4;1 3 4;2 3 4 are all OK, and 2 3 4 with maximum lexicographic)n nnSample Inputn2n4n5004 5005n5005 5006n5004 5006n5004 5006n7n4 5n2 3n1 2n2 2n4 4n2 3n3 4n nnSample Outputn3n2 3 4n5n1 3 5 6 7n 问答

Holedox Moving

10-09

DescriptionnnDuring winter, the most hungry and severe time, Holedox sleeps in its lair. When spring comes, Holedox wakes up, moves to the exit of its lair, comes out, and begins its new life. nHoledox is a special snake, but its body is not very long. Its lair is like a maze and can be imagined as a rectangle with n*m squares. Each square is either a stone or a vacant place, and only vacant places allow Holedox to move in. Using ordered pair of row and column number of the lair, the square of exit located at (1,1). nnHoledox's body, whose length is L, can be represented block by block. And let B1(r1,c1) B2(r2,c2) .. BL(rL,cL) denote its L length body, where Bi is adjacent to Bi+1 in the lair for 1 <= i <=L-1, and B1 is its head, BL is its tail. nnTo move in the lair, Holedox chooses an adjacent vacant square of its head, which is neither a stone nor occupied by its body. Then it moves the head into the vacant square, and at the same time, each other block of its body is moved into the square occupied by the corresponding previous block. nnFor example, in the Figure 2, at the beginning the body of Holedox can be represented as B1(4,1) B2(4,2) B3(3,2)B4(3,1). During the next step, observing that B1'(5,1) is the only square that the head can be moved into, Holedox moves its head into B1'(5,1), then moves B2 into B1, B3 into B2, and B4 into B3. Thus after one step, the body of Holedox locates in B1(5,1)B2(4,1)B3(4,2) B4(3,2) (see the Figure 3). nnGiven the map of the lair and the original location of each block of Holedox's body, your task is to write a program to tell the minimal number of steps that Holedox has to take to move its head to reach the square of exit (1,1). n![](http://poj.org/images/1324_1.jpg)nInputnnThe input consists of several test cases. The first line of each case contains three integers n, m (1<=n, m<=20) and L (2<=L<=8), representing the number of rows in the lair, the number of columns in the lair and the body length of Holedox, respectively. The next L lines contain a pair of row and column number each, indicating the original position of each block of Holedox's body, from B1(r1,c1) to BL(rL,cL) orderly, where 1<=ri<=n, and 1<=ci<=m,1<=i<=L. The next line contains an integer K, representing the number of squares of stones in the lair. The following K lines contain a pair of row and column number each, indicating the location of each square of stone. Then a blank line follows to separate the cases. nnThe input is terminated by a line with three zeros. nnNote: Bi is always adjacent to Bi+1 (1<=i<=L-1) and exit square (1,1) will never be a stone. nOutputnnFor each test case output one line containing the test case number followed by the minimal number of steps Holedox has to take. "-1" means no solution for that case.nSample Inputnn5 6 4n4 1n4 2n3 2n3 1n3n2 3n3 3n3 4nn4 4 4n2 3n1 3n1 4n2 4n4nn2 1n2 2n3 4n4 2nn0 0 0nSample OutputnnCase 1: 9nCase 2: -1 问答

Moving Bricks

11-22

Problem DescriptionnBrickgao used to be a real tall, wealthy, handsome man and you might know him well. If you don't, please draw attention to the details below.nBrickgao tried his fortune in investment of golden bricks with his two partners LS and Jne. Because he knew little about investment he gave his total trust and bank savings to his two partners who looked smart. nHowever, due to the bad luck and lack of business skills, LS and Jne used up Brickgao's fund, and nothing in return. Their investment failed and the three become diaosi. nBrickgao had no other choice but to earn a living as a construction worker and he found his place on a building site moving bricks which of course was not golden ones. There were many brick fragment scattered on the site and workers had to move them to the building that under construction. Brickgao was made to cope with the task.nThe problem is that the Brickgao couldn’t carry more than two bricks at a time since they were too heavy. Also, if he had taken a brick, he couldn’t put it anywhere except the goal building — his inherent sense of order does not let him do so.nYou are given N pairs of coordinates of the bricks and the coordinates of the goal building. It is known that the Brickgao covers the distance between any two points in the time equal to the squared length of the segment between the points. It is also known that initially the coordinates of the Brickgao and the goal building are the same. You are asked to find such an order of bricks, that the Brickgao could move all the bricks to the building in a minimum time period. You can assume the no two bricks shared the same coordinates. If more than one optimum moving sequence Brickgao could find, he would choose the smallest lexicographic one because of the inherent sense of order.n nnInputnThe first line of the input file contains an integer T which indicates the number of test cases. The first line of each case contains the building's coordinates x ,y. The second line contains number N (1<= N < 20) — the amount of bricks on the building site. The following N lines contain the bricks' coordinates. All the coordinates do not exceed 100 in absolute value. All the given positions are different. All the numbers are integer.n nnOutputnFor each test case, first you should print "Case x:" in a line, where x stands for the case number started with 1. Then two lines follow: the first line output the only number — the minimum time Brickgao needed to move the bricks to building, and the second line output the optimum order for Brickgao to move the bricks. Each brick in the input is described by its index number (from 1 to N).n nnSample Inputn2n0 0n2n1 1n-1 1n1 1n3n4 3n3 4n0 0n nnSample OutputnCase 1:n8n1 2nCase 2:n32n1 2 3n 问答

没有更多推荐了,返回首页