## [ACM_HDU_1050]Moving Tables

### Moving Tables

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 9950 Accepted Submission(s): 3389

#### Description

The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure.

The floor has 200 rooms each on the north side and south side along the corridor. Recently the Company made a plan to reform its system. The reform includes moving a lot of tables between rooms. Because the corridor is narrow and all the tables are big, only one table can pass through the corridor. Some plan is needed to make the moving efficient. The manager figured out the following plan: Moving a table from a room to another room can be done within 10 minutes. When moving a table from room i to room j, the part of the corridor between the front of room i and the front of room j is used. So, during each 10 minutes, several moving between two rooms not sharing the same part of the corridor will be done simultaneously. To make it clear the manager illustrated the possible cases and impossible cases of simultaneous moving.

For each room, at most one table will be either moved in or moved out. Now, the manager seeks out a method to minimize the time to move all the tables. Your job is to write a program to solve the manager’s problem.

(阅读全文…)

## [ACM_ZJUT_1063]Lily's Puzzle

### Lily's puzzle

Time Limit:1000MS Memory Limit:32768K

(阅读全文…)

## [ACM_HDU_2037]今年暑假不AC

### 今年暑假不AC

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 13173 Accepted Submission(s): 6807

“今年暑假不AC？”

“是的。”

“那你干什么呢？”

“看世界杯呀，笨蛋！”

“@#\$%^&*%...”

(阅读全文…)

## [ACM_HDU_1410]PK武林盟主

### PK武林盟主

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 621 Accepted Submission(s): 133

(阅读全文…)

## [ACM_NYOJ_270]Product of Digits

### Product of Digits

Time Limit: 1.0 second
Memory Limit: 16 MB

#### Description

Your task is to find the minimal positive integer number Q so that the product of digits of Q is exactly equal to N.

#### Input

The input contains the single integer number N (0 ≤ N ≤ 109).

#### Output

Your program should print to the output the only number Q. If such a number does not exist print −1.

(阅读全文…)