 Treasure Map

Description
You have come into possession of a pirate map that gives a series of steps to get from your landing place on a desert isle to the spot marked X where the treasure is located. Each step consists of a compass heading and a number of paces.
After spending most of your savings chartering a boat, you arrive at the island and, with the help of your portable GPS receiver, duly execute the instructions on the map. Alas, no treasure! On your return home you are astonished to learn that the pirates had no knowledge of GPS and used a magnetic compass to create the map. The pirates were unaware that their compass pointed to magnetic north rather than true north. The relative angle between magnetic north and true north varies depending where you are on the planet, but you are able to determine that on this particular desert isle, magnetic north is d degrees from true north. How close were you to the spot marked X at any moment while following the map?
InputThere are several test cases. Each test case begins with n <= 1000, the number of steps in the map. n lines follow; each consists of one of the 32 named compass points shown at right followed by a number of paces. The last line is a number giving the angle between magnetic north and true north, in degrees. A positive number indicates that magnetic north is to the east of true north; a negative indicates that it is to the west. The magnitude of this angle will not exceed 90 degrees. A line containing 0 follows the input for the last case.
Note:We use combinations of the letters N,E,S,W,b to abbreviate the names of the compass points. For example, NEbE stands for northeast by east. The 32 points are equally spaced about the compass. Clockwise, they are: N NbE NNE NEbN NE NEbE ENE EbN E EbS ESE SEbE SE SEbS SSE SbE S SbW SSW SWbS SW SWbW WSW WbS W WbN WNW NWbW NW NWbN NNW NbW.
OutputFor each test case, output a single number, rounded to two decimal places, giving the least distance (in paces) that separated you from the treasure at any point while you were following the map.
Sample Input2
NbE 10
EbS 10
90.00
2
NbE 10
EbS 10
90.00
0
Sample Output14.14
10.00
There's Treasure Everywhere! _course
20170310Finding buried treasures is simple: all you need is a map! The pirates in the Caribbean were famous for their enormous buried treasures and their elaborate maps. The maps usually read like ``Start at the lone palm tree. Take three steps towards the forest, then seventeen step towards the small spring, . . . blahblah . . . , finally six steps toward the giant rock. Dig right here, and you will find my treasure!'' Most of these directions just boil down to taking the mentioned number of steps in one of the eight principal compass directions (depicted in the left of the figure). Obviously, following the paths given by these maps may lead to an interesting tour of the local scenery, but if one is in a hurry, there is usually a much faster way: just march directly from your starting point to the place where the treasure is buried. Instead of taking three steps north, one step east, one step north, three steps east, two steps south and one step west (see figure), following the direct route (dashed line in figure) will result in a path of about 3.6 steps. You are to write a program that computes the location of and distance to a buried treasure, given a `traditional' map. Input The input contains several strings, each one on a line by itself, and each one consisting of at most 200 characters. The last string will be END, signaling the end of the input. All other strings describe one treasure map each, according to the following format: The description is a commaseparated list of pairs of lengths (positive integers less than 1000) and directions (N (north), NE (northeast), E (east), SE (southeast), S (south), SW (southwest), W (west) or NW (northwest)). For example, 3W means 3 steps to the west, and 17NE means 17 steps to the northeast. A full stop (.) terminates the description, which contains no blanks. Output For every map description in the input, first print the number of the map, as shown in the sample output. Then print the absolute coordinates of the treasure, in the format ``The treasure is located at (x,y).''. The coordinate system is oriented such that the xaxis points east, and the yaxis points north. The path always starts at the origin (0,0). On the next line print the distance to that position from the point (0,0), in the format ``The distance to the treasure is d.''. The fractional values x, y, d must be printed exact to three digits to the right of the decimal point. Print a blank line after each test case. Sample Input 3N,1E,1N,3E,2S,1W. 10NW. END Sample Output Map #1 The treasure is located at (3.000,2.000). The distance to the treasure is 3.606. Map #2 The treasure is located at (7.071,7.071). The distance to the treasure is 10.000.
Treasure Map _course
20170207Your boss once had got many copies of a treasure map. Unfortunately, all the copies are now broken to many rectangular pieces, and what make it worse, he has lost some of the pieces. Luckily, it is possible to figure out the position of each piece in the original map. Now the boss asks you, the talent programmer, to make a complete treasure map with these pieces. You need to make only one complete map and it is not necessary to use all the pieces. But remember, pieces are not allowed to overlap with each other (See sample 2). Input The first line of the input contains an integer T (T <= 500), indicating the number of cases. For each case, the first line contains three integers n m p (1 <= n, m <= 30, 1 <= p <= 500), the width and the height of the map, and the number of pieces. Then p lines follow, each consists of four integers x1 y1 x2 y2 (0 <= x1 < x2 <= n, 0 <= y1 < y2 <= m), where (x1, y1) is the coordinate of the lowerleft corner of the rectangular piece, and (x2, y2) is the coordinate of the upperright corner in the original map. Cases are separated by one blank line. Output If you can make a complete map with these pieces, output the least number of pieces you need to achieve this. If it is impossible to make one complete map, just output 1. Sample Input 3 5 5 1 0 0 5 5 5 5 2 0 0 3 5 2 0 5 5 30 30 5 0 0 30 10 0 10 30 20 0 20 30 30 0 0 15 30 15 0 30 30 Sample Output 1 1 2
Treasure of the Chimp Island _course
20170714Problem Description Bob Bennett, the young adventurer, has found the map to the treasure of the Chimp Island, where the ghost zombie pirate LeChimp, the infamous evil pirate of the Caribbeans has hidden somewhere inside the Zimbu Memorial Monument (ZM2). ZM2 is made up of a number of corridors forming a maze. To protect the treasure, LeChimp has placed a number of stone blocks inside the corridors to block the way to the treasure. The map shows the hardness of each stone block which determines how long it takes to destroy the block. ZM2 has a number of gates on the boundary from which Bob can enter the corridors. Fortunately, there may be a pack of dynamites at some gates, so that if Bob enters from such a gate, he may take the pack with him. Each pack has a number of dynamites that can be used to destroy the stone blocks in a much shorter time. Once entered, Bob cannot exit ZM2 and enter again, nor can he walk on the area of other gates (so, he cannot pick more than one pack of dynamites). The hardness of the stone blocks is an integer between 1 and 9, showing the number of days required to destroy the block. We neglect the time required to travel inside the corridors. Using a dynamite, Bob can destroy a block almost immediately, so we can ignore the time required for it too. The problem is to find the minimum time at which Bob can reach the treasure. He may choose any gate he wants to enter ZM2. Input The input consists of multiple test cases. Each test case contains the map of ZM2 viewed from the above. The map is a rectangular matrix of characters. Bob can move in four directions up, down, left, and right, but cannot move diagonally. He cannot enter a location shown by asterisk characters (*), even using all his dynamites! The character ($) shows the location of the treasure. A digit character (between 1 and 9) shows a stone block of hardness equal to the value of the digit. A hash sign (#) which can appear only on the boundary of the map indicates a gate without a dynamite pack. An uppercase letter on the boundary shows a gate with a pack of dynamites. The letter A shows there is one dynamite in the pack, B shows there are two dynamite in the pack and so on. All other characters on the boundary of the map are asterisks. Corridors are indicated by dots (.). There is a blank line after each test case. The width and the height of the map are at least 3 and at most 100 characters. The last line of the input contains two dash characters (). Output For each test case, write a single line containing a number showing the minimum number of days it takes Bob to reach the treasure, if possible. If the treasure is unreachable, write IMPOSSIBLE. Sample Input *****#********* *.1....4..$...* *..***..2.....* *..2..*****..2* *..3..******37A *****9..56....* *.....******..* ***CA********** ***** *$3** *.2** ***#*  Sample Output 1 IMPOSSIBLE
可能性的判断，输出判定性的结果，用C语言实现_course
20181205Problem Description Bob Bennett, the young adventurer, has found the map to the treasure of the Chimp Island, where the ghost zombie pirate LeChimp, the infamous evil pirate of the Caribbeans has hidden somewhere inside the Zimbu Memorial Monument (ZM2). ZM2 is made up of a number of corridors forming a maze. To protect the treasure, LeChimp has placed a number of stone blocks inside the corridors to block the way to the treasure. The map shows the hardness of each stone block which determines how long it takes to destroy the block. ZM2 has a number of gates on the boundary from which Bob can enter the corridors. Fortunately, there may be a pack of dynamites at some gates, so that if Bob enters from such a gate, he may take the pack with him. Each pack has a number of dynamites that can be used to destroy the stone blocks in a much shorter time. Once entered, Bob cannot exit ZM2 and enter again, nor can he walk on the area of other gates (so, he cannot pick more than one pack of dynamites). The hardness of the stone blocks is an integer between 1 and 9, showing the number of days required to destroy the block. We neglect the time required to travel inside the corridors. Using a dynamite, Bob can destroy a block almost immediately, so we can ignore the time required for it too. The problem is to find the minimum time at which Bob can reach the treasure. He may choose any gate he wants to enter ZM2. Input The input consists of multiple test cases. Each test case contains the map of ZM2 viewed from the above. The map is a rectangular matrix of characters. Bob can move in four directions up, down, left, and right, but cannot move diagonally. He cannot enter a location shown by asterisk characters (*), even using all his dynamites! The character ($) shows the location of the treasure. A digit character (between 1 and 9) shows a stone block of hardness equal to the value of the digit. A hash sign (#) which can appear only on the boundary of the map indicates a gate without a dynamite pack. An uppercase letter on the boundary shows a gate with a pack of dynamites. The letter A shows there is one dynamite in the pack, B shows there are two dynamite in the pack and so on. All other characters on the boundary of the map are asterisks. Corridors are indicated by dots (.). There is a blank line after each test case. The width and the height of the map are at least 3 and at most 100 characters. The last line of the input contains two dash characters (). Output For each test case, write a single line containing a number showing the minimum number of days it takes Bob to reach the treasure, if possible. If the treasure is unreachable, write IMPOSSIBLE. Sample Input *****#********* *.1....4..$...* *..***..2.....* *..2..*****..2* *..3..******37A *****9..56....* *.....******..* ***CA********** ***** *$3** *.2** ***#*  Sample Output 1 IMPOSSIBLE
The Treasure _course
20170127Description We have arrived at the age of the Internet. Many software applications have transformed from standalone to online applications. Computer games are following this trend as well. Online games are becoming more and more popular, not only because they are more intelligent, but also because they can bring great profits. "The computer game industry is developing rapidly in China. Online game revenues amounted to 1.3 billion Yuan last year and are expected to reach 6.7 billion Yuan by 2007." reported by China Daily in 2004. However, good games originate from good programmers. We take for example that there is a RPG (Role Playing Game) and your boss asks you to implement some tasks. For simplicity’s sake, we assume there are two kinds of roles in this game: one is player and the other is monster. You should help the player to achieve the goal: reach the place where treasure is positioned as early as possible and get the treasure. The map of the game is a matrix of N * M identical cells. Some cells are passable blocks, and others are nonpassable rocks. At any time, there is at most one role occupying a block. At the beginning, the time is set to 0, and the player is at a certain block. He then moves towards the treasure. At each turn, we have some rules: The player can stay in the same block during the next onesecond time duration, or he can walk or run towards the east, south, west, north, northeast, northwest, southeast, and southwest. With walking, the player can arrive at the corresponding passable blocks around him (See Fig.1). Each move takes 1 second. With running, the player can arrive at the corresponding passable blocks 2 cells away from him (See Fig.2). Each run takes 1 second. As demonstrated in Fig.3, if a neighbor cell is not passable, the player cannot run in that direction. For example, if cell 2 is a rock, running from 1 to 3 is impossible. The monsters are classified into aggressive and nonaggressive. If a monster occupies a cell, the player cannot move into that cell or run through that cell. In addition, the player cannot move into the cells surrounding an aggressive monster, because it will attack the player near it. For example, in Fig.4, if there is an aggressive monster in 5, then the cell 1, 2, 3, 4, 6, 7, 8 and 9 are in its attacking region, so the player cannot stay in or pass through these cells. Monsters change their positions each turn. Each monster appears by its position sequence iteratively. That's to say, given the position sequence of monster i: (x1, y1), (x2, y2), ..., (xs, ys), its initial position is (x1, y1) at time 0, then it appears in (x2, y2) at time 1, and so on. When monster i arrives at (xs, ys) at time s1, it will arrive in (x1, y1) at time s, and start to repeat. At the start of each turn, all the monsters change their positions first (the way of changing is given above). If a monster appears in the player's cell, or if an aggressive monster appears near the player to put him in its attacking region, the player will die, and the goal cannot be achieved. After all the monsters change their positions, the player makes a move or stays in the same cell. In his move, the moving path should not be occupied by any rocks or monsters or in the attacking region of any aggressive monsters. When counting the total time, we can neglect the time between monsters' position change and the player's move. Given the map of the game, the player's starting position, the treasure position and all the monsters' positions in every second, your task is to write a program to find the minimum time that the player gets the treasure. Input The input consists of several test cases. The first line of each case contains two integers N and M (1 <= N, M <= 100), where N is the height of the map and M is the width of the map. This is followed by N lines each containing M characters representing the map. A '#' represents a rock, a '.' is a free block, 'p' is the starting position of the player, 't' is the position of the treasure, 'n' is the initial position of a nonaggressive monster, and an 'a' stands for the initial position of an aggressive monster. The cell (i, j) is the jth cell on the ith row counting from left to right. The rows are counted from 1 to N starting from the first line of the matrix. We can number all the monsters as 1, 2, 3… according to their initial position, sorting first by row, then by column. The (n+2)th line contains an integer p (0 <= p <= 100), which is the total number of monsters (i.e. the total number of 'n's and 'a's in the matrix). It is followed by p lines each specifying a monster's position sequence in the following format: the ith (1 <= i <= p) line corresponds to monster i, which begins with an integer s (1 <= s <= 100), meaning the length of position sequence. Then s pairs of integers x1, y1, x2, y2, …, xs, ys are followed, separated by blanks. Each pair is a free block in the map, (i.e. a monster never goes to a rock cell). It is assured that none of the aggressive monsters' initial position is around the player. Two consecutive cases are separated by a blank line. The input is terminated by a line containing a pair of zeros. Output For each test case, output the minimum total time required for the player to get the treasure, in seconds. If it's not possible to get the treasure, or the minimum required time is greater than 100 seconds, please print a line just containing the string "impossible". Two consecutive cases should be separated by a blank line. Sample Input 7 8 #.#####. #.t#..p. #..#.... ..#a.#.# #...##.n .#...... ........ 2 2 4 4 5 4 3 5 8 6 8 5 7 3 3 p#. ##. t.. 0 2 2 #t p# 0 0 0 Sample Output 8 impossible 1
Unknown Treasure _course
20170926Problem Description On the way to the next secret treasure hiding place, the mathematician discovered a cave unknown to the map. The mathematician entered the cave because it is there. Somewhere deep in the cave, she found a treasure chest with a combination lock and some numbers on it. After quite a research, the mathematician found out that the correct combination to the lock would be obtained by calculating how many ways are there to pick m different apples among n of them and modulo it with M. M is the product of several different primes. Input On the first line there is an integer T(T≤20) representing the number of test cases. Each test case starts with three integers n,m,k(1≤m≤n≤1018,1≤k≤10) on a line where k is the number of primes. Following on the next line are k different primes p1,...,pk. It is guaranteed that M=p1⋅p2⋅⋅⋅pk≤1018 and pi≤105 for every i∈{1,...,k}. Output For each test case output the correct combination on a line. Sample Input 1 9 5 2 3 5 Sample Output 6
Ali and Baba _course
20170204问题描述 : There is a rectangle area (with N rows and M columns) in front of Ali and Baba, each grid might be one of the following: 1. Empty area, represented by an integer 0. 2. A Stone, represented by an integer x (x > 0) which denote the HP of this stone. 3. Treasure, represented by an integer 1. Now, Ali and Baba get the map of this mysterious area, and play the following game: Ali and Baba play alternately, with Ali starting. In each turn, the player will choose a stone that he can touch and hit it. After this operation, the HP of the stone that been hit will decrease by 1. If some stone’s HP is decreased to 0, it will become an empty area. Here, a player can touch a stone means there is path consist of empty area from the outside to the stone. Note that two grids are adjacent if and only if they share an edge. The player who hits the treasure first wins the game. 输入: The input consists several testcases. The first line contains two integer N and M (0 < N,M <= 300), the size of the maze. The following N lines each contains M integers (less than 100), describes the maze, where a positive integer represents the HP of a stone, 0 reperents an empty area, and 1 reperents the treasure. There is only one grid contains the treasure in the maze. 输出: The input consists several testcases. The first line contains two integer N and M (0 < N,M <= 300), the size of the maze. The following N lines each contains M integers (less than 100), describes the maze, where a positive integer represents the HP of a stone, 0 reperents an empty area, and 1 reperents the treasure. There is only one grid contains the treasure in the maze. 样例输入: 3 3 1 1 1 1 1 1 1 1 1 样例输出: Baba Win
二维字符连通图的问题，运用C语言的知识的综合理解的实现_course
20190205Problem Description Bob Bennett, the young adventurer, has found the map to the treasure of the Chimp Island, where the ghost zombie pirate LeChimp, the infamous evil pirate of the Caribbeans has hidden somewhere inside the Zimbu Memorial Monument (ZM2). ZM2 is made up of a number of corridors forming a maze. To protect the treasure, LeChimp has placed a number of stone blocks inside the corridors to block the way to the treasure. The map shows the hardness of each stone block which determines how long it takes to destroy the block. ZM2 has a number of gates on the boundary from which Bob can enter the corridors. Fortunately, there may be a pack of dynamites at some gates, so that if Bob enters from such a gate, he may take the pack with him. Each pack has a number of dynamites that can be used to destroy the stone blocks in a much shorter time. Once entered, Bob cannot exit ZM2 and enter again, nor can he walk on the area of other gates (so, he cannot pick more than one pack of dynamites). The hardness of the stone blocks is an integer between 1 and 9, showing the number of days required to destroy the block. We neglect the time required to travel inside the corridors. Using a dynamite, Bob can destroy a block almost immediately, so we can ignore the time required for it too. The problem is to find the minimum time at which Bob can reach the treasure. He may choose any gate he wants to enter ZM2. Input The input consists of multiple test cases. Each test case contains the map of ZM2 viewed from the above. The map is a rectangular matrix of characters. Bob can move in four directions up, down, left, and right, but cannot move diagonally. He cannot enter a location shown by asterisk characters (*), even using all his dynamites! The character ($) shows the location of the treasure. A digit character (between 1 and 9) shows a stone block of hardness equal to the value of the digit. A hash sign (#) which can appear only on the boundary of the map indicates a gate without a dynamite pack. An uppercase letter on the boundary shows a gate with a pack of dynamites. The letter A shows there is one dynamite in the pack, B shows there are two dynamite in the pack and so on. All other characters on the boundary of the map are asterisks. Corridors are indicated by dots (.). There is a blank line after each test case. The width and the height of the map are at least 3 and at most 100 characters. The last line of the input contains two dash characters (). Output For each test case, write a single line containing a number showing the minimum number of days it takes Bob to reach the treasure, if possible. If the treasure is unreachable, write IMPOSSIBLE. Sample Input *****#********* *.1....4..$...* *..***..2.....* *..2..*****..2* *..3..******37A *****9..56....* *.....******..* ***CA********** ***** *$3** *.2** ***#*  Sample Output 1 IMPOSSIBLE
Very Hard Problem _course
20170829It was in the ancient world. ZOJ, the greatest treasure hunter in the world has been lost in the forest for more than 100 hours. Being with no food and no water for such a long time, he was really exhausted this night. He then took out an old map, which was a very strange map. There are many stared positions on the map and it seems those stars are connected by some roads. "I'm sure the treasure is near me, but where is it?", said ZOJ, "If I can't find it, I will be laughed by others." Suddenly, ZOJ noticed a slight light. "It was unsual.", said ZOJ and he started looking for the treasure again. After three hours' search, he finally found an entrance. But to enter the entrance, a puzzle should be solved. The puzzle was described like this. Every time, you were given a character in the set {'', '!', '~'} and a bbased number. You should take the character as an operator (i.e. '' changes a number to its opposite number, '!' changes zero to one and nonzero value to zero, '~' takes bitwise operation NOT on all 64 bits of a number) and operates on the number. All you need to do is to print out the result. The puzzle seemed quite simple, but ZOJ was only good at working out the output of the programs written by others, and had no idea about how to solve such a problem. So he turned to you for help. Input There are multiple test cases. In each test case, a character ch, a number b and a number n in bbased (2 ≤ b ≤ 16, when b is no less than 10, 'a'..'f' or 'A'..'F' are used) are given in order in one line. ch is assured to be in the set {'', '!', '~'}, the number (n)b is assured in the range of a signed 64bit integer. ch, b, n are seperated by one or more spaces. Leading or trailing spaces may also be added to the lines. Output For each test case, print one line, the 10based result. Sample Input ~ 10 4 ! 10 0  16 F Sample Output 5 1 15
二叉搜索树在数据结构方面的综合运用，如何利用C语言编程解决这个算法？_course
20190207Problem Description Bob Bennett, the young adventurer, has found the map to the treasure of the Chimp Island, where the ghost zombie pirate LeChimp, the infamous evil pirate of the Caribbeans has hidden somewhere inside the Zimbu Memorial Monument (ZM2). ZM2 is made up of a number of corridors forming a maze. To protect the treasure, LeChimp has placed a number of stone blocks inside the corridors to block the way to the treasure. The map shows the hardness of each stone block which determines how long it takes to destroy the block. ZM2 has a number of gates on the boundary from which Bob can enter the corridors. Fortunately, there may be a pack of dynamites at some gates, so that if Bob enters from such a gate, he may take the pack with him. Each pack has a number of dynamites that can be used to destroy the stone blocks in a much shorter time. Once entered, Bob cannot exit ZM2 and enter again, nor can he walk on the area of other gates (so, he cannot pick more than one pack of dynamites). The hardness of the stone blocks is an integer between 1 and 9, showing the number of days required to destroy the block. We neglect the time required to travel inside the corridors. Using a dynamite, Bob can destroy a block almost immediately, so we can ignore the time required for it too. The problem is to find the minimum time at which Bob can reach the treasure. He may choose any gate he wants to enter ZM2. Input The input consists of multiple test cases. Each test case contains the map of ZM2 viewed from the above. The map is a rectangular matrix of characters. Bob can move in four directions up, down, left, and right, but cannot move diagonally. He cannot enter a location shown by asterisk characters (*), even using all his dynamites! The character ($) shows the location of the treasure. A digit character (between 1 and 9) shows a stone block of hardness equal to the value of the digit. A hash sign (#) which can appear only on the boundary of the map indicates a gate without a dynamite pack. An uppercase letter on the boundary shows a gate with a pack of dynamites. The letter A shows there is one dynamite in the pack, B shows there are two dynamite in the pack and so on. All other characters on the boundary of the map are asterisks. Corridors are indicated by dots (.). There is a blank line after each test case. The width and the height of the map are at least 3 and at most 100 characters. The last line of the input contains two dash characters (). Output For each test case, write a single line containing a number showing the minimum number of days it takes Bob to reach the treasure, if possible. If the treasure is unreachable, write IMPOSSIBLE. Sample Input *****#********* *.1....4..$...* *..***..2.....* *..2..*****..2* *..3..******37A *****9..56....* *.....******..* ***CA********** ***** *$3** *.2** ***#*  Sample Output 1 IMPOSSIBLE
Map _course
20170124Description A pirate's treasure map typically contains a series of instructions which, if followed, lead you from the landing place on a desert isle to the spot marked X where the treasure is buried. You are to construct such a series of instructions for a particular desert isle. The island is a circle with radius r paces whose centre is at (0,0). Relative to the centre, the point (0,1) is north, (0,1) is south, (1,0) is east, and (1,0) is west. Also, (1,1) is northeast, (1,1) is southeast, (1,1) is northwest, and (1,1) is southwest. The landing place, on the circumference, is specified by its coordinates. The spot marked X, on the surface of the island is also specified by its coordinates. Each instruction in the sequence should have the form direction distance where direction is one of { north, south, east, west, northeast, northwest, southeast, southwest } and distance is a nonnegative real number indicating the number of paces to be travelled in the given direction. When executed as a sequence the instructions should lead from the landing place to the spot marked X without leaving the island. The total distance (that is, the sum of the distances in your sequence) should be minimized. From the possible sequences that minimize total distance, choose one with the minimum number of instructions. Input Input will consist of a number of test cases, followed by a line containing 1. Each test case consists of a single line containing five real numbers: r, x, y, X, Y. r is the radius of the island; x,y are the coordinates of the landing place; X,Y are the coordinates of the spot marked X. The landing place and the spot marked X are distinct. Output For each test case, output the sequence, one instruction per line. Distances should be accurate to ten places after the decimal, as shown. Output an empty line between test cases. Sample Input 100.0 0.0 100.0 25.0 50.0 1 Sample Output south 25.0000000000 southeast 35.3553390593
Treasure of the Chimp Island 算法实现_course
20200204Problem Description Bob Bennett, the young adventurer, has found the map to the treasure of the Chimp Island, where the ghost zombie pirate LeChimp, the infamous evil pirate of the Caribbeans has hidden somewhere inside the Zimbu Memorial Monument (ZM2). ZM2 is made up of a number of corridors forming a maze. To protect the treasure, LeChimp has placed a number of stone blocks inside the corridors to block the way to the treasure. The map shows the hardness of each stone block which determines how long it takes to destroy the block. ZM2 has a number of gates on the boundary from which Bob can enter the corridors. Fortunately, there may be a pack of dynamites at some gates, so that if Bob enters from such a gate, he may take the pack with him. Each pack has a number of dynamites that can be used to destroy the stone blocks in a much shorter time. Once entered, Bob cannot exit ZM2 and enter again, nor can he walk on the area of other gates (so, he cannot pick more than one pack of dynamites). The hardness of the stone blocks is an integer between 1 and 9, showing the number of days required to destroy the block. We neglect the time required to travel inside the corridors. Using a dynamite, Bob can destroy a block almost immediately, so we can ignore the time required for it too. The problem is to find the minimum time at which Bob can reach the treasure. He may choose any gate he wants to enter ZM2. Input The input consists of multiple test cases. Each test case contains the map of ZM2 viewed from the above. The map is a rectangular matrix of characters. Bob can move in four directions up, down, left, and right, but cannot move diagonally. He cannot enter a location shown by asterisk characters (*), even using all his dynamites! The character ($) shows the location of the treasure. A digit character (between 1 and 9) shows a stone block of hardness equal to the value of the digit. A hash sign (#) which can appear only on the boundary of the map indicates a gate without a dynamite pack. An uppercase letter on the boundary shows a gate with a pack of dynamites. The letter A shows there is one dynamite in the pack, B shows there are two dynamite in the pack and so on. All other characters on the boundary of the map are asterisks. Corridors are indicated by dots (.). There is a blank line after each test case. The width and the height of the map are at least 3 and at most 100 characters. The last line of the input contains two dash characters (). Output For each test case, write a single line containing a number showing the minimum number of days it takes Bob to reach the treasure, if possible. If the treasure is unreachable, write IMPOSSIBLE. Sample Input *****#********* *.1....4..$...* *..***..2.....* *..2..*****..2* *..3..******37A *****9..56....* *.....******..* ***CA********** ***** *$3** *.2** ***#*  Sample Output 1 IMPOSSIBLE
 43KB
炉温系统的PID控制器设计——MATLAB程序
20180517本文主要研究的课题是：炉温系统的PID控制器设计研究 ，并且在MATLAB的大环境下进行模拟仿真。 (1)第一章 介绍课题的研究背景、意义以及发展现状。 (2)第二章 建立炉温系统数学模型 (3)第三
Linux系统编程：入门篇视频教程
20181016Linux系统编程视频课程为《Linux系统编程》入门篇，主要针对零基础的Linux开发学员科普Linux系统编程的概念以及需要掌握的各种技能，掌握Linux命令编写、Linux学习路线并熟悉嵌入式设备编程的方法。为后续的Linux系统编程深入学习打下良好的基础。
C++语言基础视频教程
20150301C++语言基础视频培训课程：本课与主讲者在大学开出的程序设计课程直接对接，准确把握知识点，注重教学视频与实践体系的结合，帮助初学者有效学习。本教程详细介绍C++语言中的封装、数据隐藏、继承、多态的实现等入门知识；主要包括类的声明、对象定义、构造函数和析构函数、运算符重载、继承和派生、多态性实现等。 课程需要有C语言程序设计的基础（可以利用本人开出的《C语言与程序设计》系列课学习）。学习者能够通过实践的方式，学会利用C++语言解决问题，具备进一步学习利用C++开发应用程序的基础。
java后台+微信小程序 实现完整的点餐系统
20190727后台技术选型： JDK8 MySQL Springboot Springdatajpa Lombok Freemarker Bootstrap Websocket 小程序端技术选型 微信小程序 小程序端 扫码点餐 菜品分类显示 模拟支付 评论系统 购物车
程序员的算法通关课：知己知彼（第一季）
20191228【超实用课程内容】 程序员对于算法一直又爱又恨！特别是在求职面试时，算法类问题绝对是不可逃避的提问点！本门课程作为算法面试系列的第一季，会从“知己知彼”的角度，聊聊关于算法面试的那些事～ 【哪些人适合学习这门课程？】 求职中的开发者，对于面试算法阶段缺少经验 想了解实际工作中算法相关知识 在职程序员，算法基础薄弱，急需充电 【超人气讲师】 孙秀洋  服务器端工程师 硕士毕业于哈工大计算机科学与技术专业，ACM亚洲区赛铜奖获得者，先后在腾讯和百度从事一线技术研发，对算法和后端技术有深刻见解。 【课程如何观看？】 PC端：https://edu.csdn.net/course/detail/27272 移动端：CSDN 学院APP（注意不是CSDN APP哦） 本课程为录播课，课程无限观看时长，但是大家可以抓紧时间学习后一起讨论哦~
 472KB
HTML5+CSS3 精美登陆界面源码
201601193个很精美的登陆界面，全都是用HTML5+CSS3开发的，所以可能不适合低版本IE浏览器。大家可以下来看看，做的超级漂亮的。
Mysql数据库基础入门视频教程
20181024Mysql数据库基础入门视频课程：属于零基础Mysql数据库教程，从数据库的基本专业术语介绍到数据库软件的下载使用 一步一步带你安装MySql。SQL阶段你将学会如果使用数据定义语言DDL,数据操作语言DML,数据查询语言DQL 在学会各中查询语句之后,会带你学习数据的完整性, 掌握如果正确的向数据库中添加数据 以上掌握技能之后,将会带你学习如何进行多表操作,关系的建立,各种连接查询等. 常用函数,事务的学习,您将学到什么是事务的提交,回滚,并发操作及脏读,幻读. 最后视图,存储过程,索引的学习,将会带你掌握更高级的数据库技术.
 41.5MB
java jdk 8 帮助文档 中文 文档 chm 谷歌翻译
20170402JDK1.8 API 中文谷歌翻译版 java帮助文档 JDK API java 帮助文档 谷歌翻译 JDK1.8 API 中文 谷歌翻译版 java帮助文档 Java最新帮助文档 本帮助文档是使用谷
MATLAB基础入门课程
20170913MATLAB基础入门课程，系统介绍MATLAB的基础知识。 主要从数组、运算、结构和绘图等几方面进行讲解 简单易懂，轻松入门MATLAB
程序员入门指南
20200427如何快速成为一个程序员？为什么同事说的事情都好像听不懂，同事用的工具都好像没听过？别着急，跟着课程带你进行扫盲。从工具入手，再也不怕跟不上同事的speed了～
C/C++程序员实战基础
20190820 1.67MB
c语言项目开发实例
20111101十个c语言案例 （1）贪吃蛇 （2）五子棋游戏 （3）电话薄管理系统 （4）计算器 （5）万年历 （6）电子表 （7）客户端和服务器通信 （8）潜艇大战游戏 （9）鼠标器程序 （10）手机通讯录系统
 117B
Keil5安装包
20190523Keil5安装包，附带STM31F1、STM32F4支持包以及破解软件。
软件测试2小时入门
20181010本课程内容系统、全面、简洁、通俗易懂，通过2个多小时的介绍，让大家对软件测试有个系统的理解和认识，具备基本的软件测试理论基础。 主要内容分为5个部分： 1 软件测试概述，了解测试是什么、测试的对象、原则、流程、方法、模型； 2.常用的黑盒测试用例设计方法及示例演示； 3 常用白盒测试用例设计方法及示例演示； 4.自动化测试优缺点、使用范围及示例‘； 5.测试经验谈。
 83.13MB
模型剪枝20152020论文合集已分类已整理
20201025模型剪枝领域，20152020论文合集，根据github上awesomepruning 下载整理的，包括基本所有的论文和综述，已分类整理重命名（如CVPR2020论文名）十分全，强烈建议下载阅读
 学院 极简数据分析入门
 学院 架构师套餐/JVM/高并发/微服务/Docker等
 下载 APACHE的AcceptPathInfo指令使用介绍
 学院 朱老师鸿蒙系列课程第1期1.鸿蒙系统HarmonyOS打通开发实践
 学院 CMake工程管理入门精讲
 学院 Java微信小程序珠宝首饰购物商城 大学生毕业设计教学视频
 下载 使用jQuery fancybox插件打造一个实用的数据传输模态弹出窗体
 学院 Java+FFmpeg开发音视频流媒体直播等
 博客 基于Unity与C#控制台的局域网音视频通话解决方案
 下载 体验js中splice()的强大(插入、删除或替换数组的元素)
 学院 白帽黑客网络攻防与Python编程
 博客 总结HTTP中常见的一些名词
 学院 【数据分析】 第十一周 hadoop数据分析
 下载 Quectel_Linux&Android_GobiNet_Driver_V1.6.2.9.zip
 下载 ASP.NET下将Excel表格中的数据规则的导入数据库思路分析及实现
 博客 OC底层探索(十六) KVO底层原理
 学院 Java微信小程序家具家居购物商城 大学生毕业设计教学视频
 学院 全平台OpenGL游戏技术(OSX/Windows/Android/iOS)
 博客 SpringBoot整合ElasticSearch（第八更）
 学院 重学Vue：Vue3.0全家桶入门到实战
 博客 python学习笔记
 学院 基于海思3536平台为示例的嵌入式软件开发基础篇
 博客 Struts2的数据封装
 博客 跨工程编译orbslam3内存中断问题
 博客 20201027
 学院 FFmpeg4.3开发系列之七：WEB音视频转码器Java版
 博客 9.三层交换配置实验
 学院 白帽黑客之Metasploit
 博客 Python删除全部已安装的pip包
 博客 练习410 找出最小值 (20分)