 Decompressing in a GIF

Problem Description
One well known method to compress image files is the Graphics Interchange Format (GIF) encoding, created by CompuServe in 1987. Here’s a simplified version applied to strings of alphabetic characters. Essential for this compression is a dictionary which assigns numeric encodings (we’ll use base 10 numbers for this problem) to different strings of characters. The dictionary is initialized with mappings for characters or substrings which may appear in the string. For example, if we expect to encounter all 26 letters of the alphabet, the dictionary will initially store the encodings (A, 00), (B, 01), (C, 02), . . . , (Z, 25). If we are compressing DNA data, the dictionary will initially store only 4 entries: (A, 0), (T, 1), (G, 2) and (C, 3). Note that the length of each initial encoding is the same for all entries (2 digits in the first example, and 1 digit in the second).The compression algorithm proceeds as follows:
Find the longest prefix of the uncompressed portion of the string which is in the dictionary, and replace it with its numeric encoding.
If the end of the string has not been reached, add a new mapping (s, n) to the dictionary, where s = the prefix just compressed plus the next character after it in the string, and n = the smallest number not yet used in the dictionary.
For example, assume we started with the string ABABBAABB and a dictionary with just two entries, (A, 0) and (B, 1). The table below shows the steps in compressing the string.
The final compressed string is 01234.
There is only one other rule: the replacement strings used are always the size of the longest encoding in the dictionary at the time the replacement occurs. Thus, with the dictionary above, if the string to compress is long enough that an entry of the form (s, 10) is added to the dictionary, then from this point on all numerical replacement strings used in the compressed string must be expanded to 2 digits long (i.e., A will now be encoded as 00, B as 01, AB as 02, etc.); if an entry (s′, 100) is added to the dictionary, all replacements from this point forward will increase to 3 digits long, and so on. Thus, the longer string ABABBAABBAABAABAB will be encoded as 01234027301, not 0123402731. Try it!
OK, now that you are experts at compressing, it’s time to relax and decompress!
Input
Each test case will consist of two lines. The first line will contain a string of digits to decompress. The second line will contain the initial dictionary used in the compression. This line will start with a positive integer n indicating the number of entries in the dictionary (1 ≤ n ≤ 100), followed by n alphabetic strings. The first of these will be paired with 0 in the dictionary (or 00 if n > 10), the second with 1, and so on. The last test case will be followed by a line containing a single 0.Output
For each test case, output a single line containing the case number (using the format shown below) followed by the decompressed string. All input strings will have been legally compressed.Sample Input
01234
2 A B
01234027301
2 A B
02151120182729
26 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
21104
3 BA A C
01
2 JA VA
0Sample Output
Case 1: ABABBAABB
Case 2: ABABBAABBAABAABAB
Case 3: CPLUSPLUS
Case 4: CAABAAA
Case 5: JAVA
用sql developer创建新用户出现问题。。新手，第一次用oracle，求解_course
20160411在行 2 上开始执行命令时出错: CREATE USER ##liupeng IDENTIFIED BY liupeng DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP" 命令出错, 行: 2 列: 13 错误报告: SQL 错误: ORA00911: 无效字符 00911. 00000  "invalid character" *Cause: identifiers may not start with any ASCII character other than letters and numbers. $#_ are also allowed after the first character. Identifiers enclosed by doublequotes may contain any character other than a doublequote. Alternative quotes (q'#...#') cannot use spaces, tabs, or carriage returns as delimiters. For all other contexts, consult the SQL Language Reference Manual. *Action: 在行 7 上开始执行命令时出错: GRANT "DBA" TO ##liupeng 错误报告: SQL 错误: ORA00911: 无效字符 00911. 00000  "invalid character" *Cause: identifiers may not start with any ASCII character other than letters and numbers. $#_ are also allowed after the first character. Identifiers enclosed by doublequotes may contain any character other than a doublequote. Alternative quotes (q'#...#') cannot use spaces, tabs, or carriage returns as delimiters. For all other contexts, consult the SQL Language Reference Manual. *Action: 在行 12 上开始执行命令时出错: ALTER USER ##liupeng QUOTA UNLIMITED ON SYSTEM 错误报告: SQL 错误: ORA00911: 无效字符 00911. 00000  "invalid character" *Cause: identifiers may not start with any ASCII character other than letters and numbers. $#_ are also allowed after the first character. Identifiers enclosed by doublequotes may contain any character other than a doublequote. Alternative quotes (q'#...#') cannot use spaces, tabs, or carriage returns as delimiters. For all other contexts, consult the SQL Language Reference Manual.
leetcode第一题java代码报错。求原因？_course
20150428package com.hust.ali.test; import java.util.*; /** * 给定一个整数数组，发现两个数字，使得它们添加到一个特定的目标数。 * 函数twoSum应返回两个数字，使得它们加起来的目标，其中索引1必须小于索引2的所有。 * @author Cat * */ public class TwoNumSum { /** * @param args */ public static void main(String[] args) { int[] num = {0,4,3,0,6,9}; TwoNumSum ts = new TwoNumSum(); int[] result = ts.twoSum (num, 7); System.out.println(result[0]+" " + result[1]); } public int[] twoSum (int[] numbers,int target){ IdentityHashMap<Integer, Integer> hashNum = new IdentityHashMap<Integer, Integer>(); Integer[] temp = new Integer[numbers.length]; for(int i=0;i<numbers.length;i++){ temp[i] = new Integer(numbers[i]); hashNum.put(temp[i] , i); } Arrays.sort(numbers); Arrays.sort(temp); int i = 0 , j = numbers.length  1; int[] result = new int[2]; while( i < j){ if( numbers[i] + numbers[j] == target ){ result[0] = hashNum.get(temp[i])+1; result[1] = hashNum.get(temp[j])+1; break; }else if (numbers[i] + numbers[j] > target ){ j; }else if(i < numbers.length1){ i++; } } Arrays.sort(result); return result; } }
Rational Irrationals _course
20170304Rational numbers are numbers represented by ratios of two integers. For a prime number p, one of the elementary theorems in the number theory is that there is no rational number equal to the square root of p (abbreviated to SQRT(p)). Such numbers are called irrational numbers. It is also known that there are rational numbers arbitrarily close to SQRT(p). Now, given a positive integer n, we define a set Qn of all rational numbers whose elements are represented by ratios of two positive integers both of which are less than or equal to n. For example, Q4 is a set of 11 rational numbers {1/1, 1/2, 1/3, 1/4, 2/1, 2/3, 3/1, 3/2, 3/4, 4/1, 4/3}. 2/2, 2/4, 3/3, 4/2 and 4/4 are not included here because they are equal to 1/1, 1/2, 1/1, 2/1 and 1/1, respectively. Your job is to write a program that reads two integers p and n and reports two rational numbers x/y and u/v, where u/v < SQRT(p) < x/y and there are no other elements of Qn between u/v and x/y. When n is greater than SQRT(p), such a pair of rational numbers always exists. Input The input consists of lines each of which contains two positive integers, a prime number p and an integer n in the following format. p n They are separated by a space character. You can assume that p and n are less than 10000, and that n is greater than SQRT(p). The end of the input is indicated by a line consisting of two zeros. Output For each input line, your program should output a line consisting of the two rational numbers x/y and u/v (x/y > u/v) separated by a space character in the following format. x/y u/v They should be irreducible. For example, 6/14 and 15/3 are not accepted. They should be reduced to 3/7 and 5/1, respectively. Sample Input 2 5 3 10 5 100 0 0 Sample Output 3/2 4/3 7/4 5/3 85/38 38/17
oracle使用imp导入数据库出问题IMP00009_course
20150726** imp导入数据库中途出错**：（：IMP00009、IMP00027、IMP00003、ORA01013:）；dmp文件大小500G **emp导出日志（部分）**： Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0  Production With the Partitioning, OLAP and Data Mining options Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set About to export specified users ... . exporting preschema procedural objects and actions . exporting foreign function library names for user SHDUCHA . exporting PUBLIC type synonyms . exporting private type synonyms . exporting object type definitions for user SHDUCHA About to export SHDUCHA's objects ... . exporting database links . exporting sequence numbers . exporting cluster definitions . about to export SHDUCHA's tables via Conventional Path ... **imp导出日志（部分）**： Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0  Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Export file created by EXPORT:V10.02.01 via conventional path import done in ZHS16GBK character set and AL16UTF16 NCHAR character set . . . . importing table "TB_I_G_3_106_82_97" 72632 rows imported . . importing table "TB_I_G_3_106_83_101" IMP00009: abnormal end of export file IMP00027: failed to rollback partial import of previous table IMP00003: ORACLE error 1013 encountered ORA01013: user requested cancel of current operation IMP00000: Import terminated unsuccessfully
Barbara Bennett's Wild Numbers _course
20171026Description A wild number is a string containing digits and question marks (like 36?1?8). A number X matches a wild number W if they have the same length, and every nonquestion mark character in X is equal to the character in the same position in W (it means that you can replace a question mark with any digit). For example, 365198 matches the wild number 36?1?8, but 360199, 361028, or 36128 does not. Write a program that reads a wild number W and a number X from input, both of length n, and determines the number of ndigit numbers that match W and are greater than X. Input There are multiple test cases in the input. Each test case consists of two lines of the same length. The first line contains a wild number W, and the second line contains an integer number X. The length of input lines is between 1 and 10 characters. The last line of input contains a single character #. Output For each test case, write a single line containing the number of ndigit numbers matching W and greater than X (n is the length of W and X). Sample Input 36?1?8 236428 8?3 910 ? 5 # Sample Output 100 0 4
Shortcut _course
20171013Description Mirek has a favourite way from home to the university that he traverses every working day. The route consists of sections and each section is a straight segment 10 meters long. Each section is either a straight ahead extension of the previous section or it is perpendicular to the previous section. After traversing each section Mirek takes a small break to admire the beauty of the nature. During his walk he never visits the same place twice. ![](http://poj.org/images/1763_1.jpg) Yesterday Mirek stayed up long in the night at the party and today he got up late from bed. He knows that he will miss the first lecture unless he changes his usual route. He plans to make one shortcut but he wants the shortcut to be as short as possible (well, we can tell you in secret that he doesn't want to be on time, he just wants to calm his conscience). The shortcut must be either a horizontal or vertical segment connecting two break points of Mirek's route. Please help Mirek find the shortest shortcut. Task Write a program that: reads Mirek's route, computes the shortest shortcut on the route, writes the result. Input The first line of the input contains one integer n (3 <= n <= 250 000) being the number of sections of the route. The second line of the input contains a sequence of n characters N, E, S or W with no spaces in between. Each character is a description of one section of the route. Character N, E, S or W means that Mirek walks 10 meters north, east, south or west respectively. You may assume that at least one shortcut exists for the given route. Output The first and only line of the output contains integers l, b, e and character d separated by single spaces. Integer l is the length of the shortest shortcut (measured in 10 m segments). Integers b and e are the numbers of break points where the shortcut begins and ends respectively (we number break points with consecutive integers from 0 for Mirek's home to n for the university). Character d is the direction of the shortcut. If more than one shortcut of the minimal length exists you should output the one that begins earliest on the route. If more than one shortcut of the minimal length begins at the same break point you should output the one that ends furthest on the route. Sample Input 12 NNNENNWWWSSW Sample Output 2 3 11 W
Tram _course
20171013Description Tram network in Zagreb consists of a number of intersections and rails connecting some of them. In every intersection there is a switch pointing to the one of the rails going out of the intersection. When the tram enters the intersection it can leave only in the direction the switch is pointing. If the driver wants to go some other way, he/she has to manually change the switch. When a driver has do drive from intersection A to the intersection B he/she tries to choose the route that will minimize the number of times he/she will have to change the switches manually. Write a program that will calculate the minimal number of switch changes necessary to travel from intersection A to intersection B. Input The first line of the input contains integers N, A and B, separated by a single blank character, 2 <= N <= 100, 1 <= A, B <= N, N is the number of intersections in the network, and intersections are numbered from 1 to N. Each of the following N lines contain a sequence of integers separated by a single blank character. First number in the ith line, Ki (0 <= Ki <= N1), represents the number of rails going out of the ith intersection. Next Ki numbers represents the intersections directly connected to the ith intersection.Switch in the ith intersection is initially pointing in the direction of the first intersection listed. Output The first and only line of the output should contain the target minimal number. If there is no route from A to B the line should contain the integer "1". Sample Input 3 2 1 2 2 3 2 3 1 2 1 2 Sample Output 0
OrderPreserving Codes _course
20170303Binary code is a mapping of characters of some alphabet to the set of finite length bit sequences. For example, standard ASCII code is a fixed length code, where each character is encoded using 8 bits. Variable length codes are often used to compress texts taking into account the frequencies of occurence of different characters. Characters that occur more often get shorter codes, while characters occuring less often  longer ones. To ensure unique decoding of variable length codes so called prefix codes are usually used. In a prefix code no code sequence is a proper prefix of another sequence. Prefix code can be easily decoded scanning the encoded sequence from left to right, since no code is the prefix of another, one always knows where the code for the current character ends and the new character starts. Among prefix codes, the optimal code is known, so called Huffman code. It provides the shortest possible length of the text among all prefix codes that separatly encode each character with an integer number of bits. However, as many other codes, Huffman code does not preserve character order. That is, Huffman codes for lexicographically ordered characters are not necessarily lexicographicaly ordered. In this problem you are asked to develop a prefix code that would be optimal for the given text among all orderpreserving prefix codes. Code is called orderpreserving if for any two characters the code sequence for the character that goes earlier in the alphabet is lexicographically smaller. Since text itself is not essential for finding the code, only the number of occurences of each character is important, only this data is given. Input: The input consists of several test cases For each test case, the first line contains n  the number of characters in the alphabet (2 <= n <= 2000). The next line contains n integer numbers  the number of occurences of the characters in the text for which the code must be developed (numbers are positive and do not exceed 109). Characters are described in the alphabetical order. Output: For each test case, Output n bit sequences, one on a line  the optimal orderpreserving prefix code for the described text. Sample Input: 5 1 8 2 3 1 Sample Output: 00 01 10 110 111
Sea Battle _course
20171015Description During the Summit, the armed forces will be highly active. The police will monitor Prague streets, the army will guard buildings, the Czech air space will be full of American F16s. Moreover, the ships and battle cruisers will be sent to guard the banks of the Vltava river. Unfortunately, in the case of any incident, the Czech Admiralty have only a few captains able to control over the large sea battle. Therefore, it was decided to educate new admirals. As an excellent preparation, the game of "Sea Battle" was chosen to help with their study program. In this wellknown game, a predefined number of ships of predefined shapes are placed on the square board in such a way that they cannot contact one another even with their corners. In this task, we will consider rectangular shaped ships only. The unknown number of rectangular ships of unknown sizes are placed on a rectangular board. All the ships are full rectangles built of hash characters. Write a program that counts the total number of ships present in the field. Input The input consists of more scenarios. The description of each scenario begins with two integer numbers R and C separated with a single space, 1 <= R,C <= 1000. These numbers give the number of rows and columns in the game field. After these two numbers, there are R lines, each of them containing C characters. Each character is either hash ("#") or dot ("."). Hashes denote ships, dots water. Then, the next scenario description begins. At the end of the input, there will be a line containing two zeros instead of the field size. Output Output a single line for every scenario. If the ships were placed correctly (i.e., there are only rectangles that do not touch each other even with a corner), print the sentence "There are S ships." where S is the number of ships. Otherwise, print the sentence "Bad placement.". Sample Input 6 6 .....# ##...# ##...# ..#..# .....# ###### 6 8 .....#.# ##.....# ##.....# .......# #......# #..#...# 0 0 Sample Output Bad placement. There are 5 ships.
Calling Extraterrestrial Intelligence Again_course
20170619Problem Description A message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on the afternoon of Saturday November 16, 1974. The message consisted of 1679 bits and was meant to be translated to a rectangular picture with 23 * 73 pixels. Since both 23 and 73 are prime numbers, 23 * 73 is the unique possible size of the translated rectangular picture each edge of which is longer than 1 pixel. Of course, there was no guarantee that the receivers would try to translate the message to a rectangular picture. Even if they would, they might put the pixels into the rectangle incorrectly. The senders of the Arecibo message were optimistic. We are planning a similar project. Your task in the project is to find the most suitable width and height of the translated rectangular picture. The term "most suitable" is defined as follows. An integer m greater than 4 is given. A positive fraction a / b less than or equal to 1 is also given. The area of the picture should not be greater than m. Both of the width and the height of the translated picture should be prime numbers. The ratio of the width to the height should not be less than a / b nor greater than 1. You should maximize the area of the picture under these constraints. In other words, you will receive an integer m and a fraction a / b. It holds that m > 4 and 0 < a / b < 1. You should find the pair of prime numbers p, q such that pq <= m and a / b <= p / q <= 1, and furthermore, the product pq takes the maximum value among such pairs of two prime numbers. You should report p and q as the "most suitable" width and height of the translated picture. Input The input is a sequence of at most 2000 triplets of positive integers, delimited by a space character in between. Each line contains a single triplet. The sequence is followed by a triplet of zeros, 0 0 0, which indicated the end of the input and should not be treated as data to be processed. The integers of each input triplet are the integer m, the numerator a, and the denominator b described above, in this order. You may assume 4 < m <= 100000 and 1 <= a <= b <= 1000. Output The output is a sequence of pairs of positive integers. The ith output pair corresponds to the ith input triplet. The integers of each output pair are the width p and the height q described above, in this order. Each output line contains a single pair. A space character is put between the integers as a delimiter. No other characters should appear in the output. Sample Input 5 1 2 99999 999 999 1680 5 16 1970 1 1 2002 4 11 0 0 0 Sample Output 2 2 313 313 23 73 43 43 37 53
Mixed Numbers _course
20170427Description A mixed fraction is defined recursively as follows: A real value is a simple mixed fraction. For simplicity, we only consider one digit positive integer numbers greater than zero (digits 1 ... 9). If a is a real value (which is again assumed as an integer between 1 and 9), and b and c are two mixed fractions, b a is a mixed fraction which is equal to a + b/c c Sum of a number of mixed fractions is also a mixed fraction. One can draw a view of a mixed fraction using ASCII characters as described below: A simple mixed fraction can be drawn using one digit character. b The mixed fraction a will be drawn using a digit showing a , and a horizontal line that starts c immediately after the letter representing a (in the same row) using '' characters. b and c are drawn recursively above and below the horizontal line respectively, such that their figures do not exceed the line from left nor right. Sum of mixed fractions is represented by drawing the mixed fractions and inserting a '+' character between each consequence pair such that the '+' character and the first character of the next and the previous mixed fractions make a horizontal line. We want you to write a program to calculate the value of a mixed fraction from its figure. Input Some 90 degree clockwise rotated figures of a number of mixed fractions are given in the input file. In the first line of each rotated mixed fraction n < 300 and m < 15000 , the length and the width of the figure, are written. In the next m lines the figure i s described ('' is replaced with ''). Note that each line will consists of exactly n characters so any number of spaces may be used in the shape, but anyway, the shape of the figure satisfies description explained above. The input ends with a line containing two zeroes. Output For each test case write its value in a separate line. Your answer must be rounded to two digits after decimal point and the output must contain exactly two digits after the decimal point. Sample Input 8 6 1 2  2 42 43  + 1 0 0 Sample Output 3.10
Triangle _course
20171017Description A triangle is a basic shape of planar geometry. It consists of three straight lines and three angles in between. Figure 1 shows how the sides and angles are usually labeled. ![](http://poj.org/images/1347_1.jpg) A look into a book about geometry shows that many formulas for triangles exist: alpha + beta + gamma = PI a / sin (alpha) = b / sin (beta) = c / sin ( gamma ) a = b cos (gamma) + c cos (beta) a^2 = b^2 + c^2  2bc*cos (alpha) (a  b) / (a + b) = tan((alpha  beta) / 2) / tan((alpha + beta) / 2) The values of a, b, c, alpha, beta, and gamma form a set of six parameters that fully define a triangle. If a large enough subset of these parameters is given, the missing ones can be calculated by using the formulas above. You are to write a program that calculates the missing parameters for a given subset of the six parameters of a triangle. For some sets of parameters, it is not possible to calculate the triangle because either too few is known about the triangle or the parameters would lead to an invalid triangle. The sides of a valid triangle are greater than 0 and the angles are greater than 0 and less than PI. Your program should detect this case and output: "Invalid input." The same phrase should be output if more than the minimal set needed to compute the triangle is given but the parameters conflict with each other, e.g. all three angles are given but their sum is greater than PI. Other sets of parameters can lead to more than one but still a finite number of valid solutions for the triangle. In such a case, your program should output: "More than one solution." In all other cases, your program should compute the missing parameters and output all six parameters. Input The first line of the input file contains a number indicating the number of parameter sets to follow. Each following line consists of six numbers, separated by a single blank character. The numbers are the values for the parameters a, alpha , b, beta, c, and gamma respectively. The parameters are labeled as shown in figure 1. A value of 1 indicates that the corresponding parameter is undefined and has to be calculated. All floatingpoint numbers include at least eight significant digits. Output Your program should output a line for each set of parameters found in the input file. If a unique solution for a valid triangle can be found for the given parameters, your program should output the six parameters a, alpha, b, beta, c, gamma, separated by a blank character. Otherwise the line should contain the phrase "More than one solution." or "Invalid input." as explained above. The numbers in the output file should include at least six significant digits. Your calculations should be precise enough to get the six most significant digits correct (i.e. a relative error of 0.000001 is allowed). Sample Input 4 47.9337906847 0.6543010109 78.4455517579 1.4813893731 66.5243757656 1.0059022695 62.72048064 2.26853639 1.00000000 0.56794657 1.00000000 1.00000000 15.69326944 0.24714213 1.00000000 1.80433105 66.04067877 1.00000000 72.83685175 1.04409241 1.00000000 1.00000000 1.00000000 1.00000000 Sample Output 47.933791 0.654301 78.445552 1.481389 66.524376 1.005902 62.720481 2.268536 44.026687 0.567947 24.587225 0.305110 Invalid input. Invalid input.
Pi _course
20170304Professor Robert A. J. Matthews of the Applied Mathematics and Computer Science Department at the University of Aston in Birmingham, England has recently described how the positions of stars across the night sky may be used to deduce a surprisingly accurate value of Pi. This result followed from the application of certain theorems in number theory. Here, we don't have the night sky, but can use the same theoretical basis to form an estimate for Pi: Given any pair of whole numbers chosen from a large, random collection of numbers, the probability that the two numbers have no common factor other than one (1) is 6/Pi^2 For example, using the small collection of numbers: 2, 3, 4, 5, 6; there are 10 pairs that can be formed: (2,3), (2,4), etc. Six of the 10 pairs: (2,3), (2,5), (3,4), (3,5), (4,5) and (5,6) have no common factor other than one. Using the ratio of the counts as the probability we have: 6/Pi^2 = 6/10 Pi = 3.162 In this problem, you'll receive a series of data sets. Each data set contains a set of pseudorandom positive integers. For each data set, find the portion of the pairs which may be formed that have no common factor other than one (1), and use the method illustrated above to obtain an estimate for Pi. Report this estimate for each data set. Input The input consists of a series of data sets. The first line of each data set contains a positive integer value, N, greater than one (1) and less than 50. There is one positive integer per line for the next N lines that constitute the set for which the pairs are to be examined. These integers are each greater than 0 and less than 32768. Each integer of the input stream has its first digit as the first character on the input line. The set size designator, N, will be zero to indicate the end of data. Output A line with a single real value is to be emitted for each input data set encountered. This value is the estimate for Pi for the data set. An output format like the sample below should be used. Answers must be rounded to six digits after the decimal point. For some data sets, it may be impossible to estimate a value for Pi. This occurs when there are no pairs without common factors. In these cases, emit the singleline message: No estimate for this data set. exactly, starting with the first character, "N", as the first character on the line. Sample Input 5 2 3 4 5 6 2 13 39 0 Sample Output 3.162278 No estimate for this data set.
01000001 _course
20161217描述 : Adding binary numbers is a very simple task, and very similar to the longhand addition of decimal numbers. As with decimal numbers, you start by adding the bits (digits) one column at a time, from right to left. Unlike decimal addition, there is little to memorize in the way of rules for the addition of binary bits: 0 + 0 = 0 1 + 0 = 1 0 + 1 = 1 1 + 1 = 10 1 + 1 + 1 = 11 Just as with decimal addition, when the sum in one column is a twobit (twodigit) number, the least significant figure is written as part of the total sum and the most significant figure is “carried” to the next left column. Consider the following examples: 11 1 <– Carry bits –> 1 11 1001101 1001001 1000111 + 0010010 + 0011001 + 1010110 ——– ——— ——— 1011111 1100010 10011101 The addition problem on the left did not require any bits to be carried, since the sum of bits in each column was either 1 or 0, not 10 or 11. In the other two problems, there definitely were bits to be carried, but the process of addition is still quite simple. 输入: The first line of input contains an integer N, (1 ≤ N ≤ 1000), which is the number of binary addition problems that follow. Each problem appears on a single line containing two binary values separated by a single space character. The maximum length of each binary value is 80 bits (binary digits). Note: The maximum length result could be 81 bits (binary digits). 输出: For each binary addition problem, print the problem number, a space, and the binary result of the addition. Extra leading zeroes must be omitted. 样例输入: 3 1001101 10010 1001001 11001 1000111 1010110 样例输出: 1 1011111 2 1100010 3 10011101
Mixe Numbers _course
20170707Description A mixed fraction is defined recursively as follows: A real value is a simple mixed fraction. For simplicity, we only consider one digit positive integer numbers greater than zero (digits 1 ... 9). If a is a real value (which is again assumed as an integer between 1 and 9), and b and c are two mixed fractions, b a is a mixed fraction which is equal to a + b/c c Sum of a number of mixed fractions is also a mixed fraction. One can draw a view of a mixed fraction using ASCII characters as described below: A simple mixed fraction can be drawn using one digit character. b The mixed fraction a will be drawn using a digit showing a , and a horizontal line that starts c immediately after the letter representing a (in the same row) using '' characters. b and c are drawn recursively above and below the horizontal line respectively, such that their figures do not exceed the line from left nor right. Sum of mixed fractions is represented by drawing the mixed fractions and inserting a '+' character between each consequence pair such that the '+' character and the first character of the next and the previous mixed fractions make a horizontal line. We want you to write a program to calculate the value of a mixed fraction from its figure. Input Some 90 degree clockwise rotated figures of a number of mixed fractions are given in the input file. In the first line of each rotated mixed fraction n < 300 and m < 15000 , the length and the width of the figure, are written. In the next m lines the figure i s described ('' is replaced with ''). Note that each line will consists of exactly n characters so any number of spaces may be used in the shape, but anyway, the shape of the figure satisfies description explained above. The input ends with a line containing two zeroes. Output For each test case write its value in a separate line. Your answer must be rounded to two digits after decimal point and the output must contain exactly two digits after the decimal point. Sample Input 8 6 1 2  2 42 43  + 1 0 0 Sample Output 3.10
Sudoku _course
20170806Description In the game of Sudoku, you are given a large 9 × 9 grid divided into smaller 3 × 3 subgrids. For example, . 2 7 3 8 . . 1 . . 1 . . . 6 7 3 5 . . . . . . . 2 9 3 . 5 6 9 2 . 8 . . . . . . . . . . . 6 . 1 7 4 5 . 3 6 4 . . . . . . . 9 5 1 8 . . . 7 . . 8 . . 6 5 3 4 . Given some of the numbers in the grid, your goal is to determine the remaining numbers such that the numbers 1 through 9 appear exactly once in (1) each of nine 3 × 3 subgrids, (2) each of the nine rows, and (3) each of the nine columns. Input The input test file will contain multiple cases. Each test case consists of a single line containing 81 characters, which represent the 81 squares of the Sudoku grid, given one row at a time. Each character is either a digit (from 1 to 9) or a period (used to indicate an unfilled square). You may assume that each puzzle in the input will have exactly one solution. The endoffile is denoted by a single line containing the word “end”. Output For each test case, print a line representing the completed Sudoku puzzle. Sample Input .2738..1..1...6735.......293.5692.8...........6.1745.364.......9518...7..8..6534. ......52..8.4......3...9...5.1...6..2..7........3.....6...1..........7.4.......3. end Sample Output 527389416819426735436751829375692184194538267268174593643217958951843672782965341 416837529982465371735129468571298643293746185864351297647913852359682714128574936
Eclipse is not a valid line number source not found_course
20140409调试报错，但是在错误堆栈中点击到具体类时，提示** is not a valid line number，然后再class File Editor中，也是提示source not found,有朋友遇到过这个问题吗？Eclipse和具体工程的Compiler都设置成1.6，引用的jdk也是1.6的。但是这个类明明是存在的，包名也绝对正确。当前工作空间只有这一个项目，不存在重名不同包的类。 求有类似问题的朋友解答，谢谢！
 373KB
2020数学建模A题
202009112020数学建模国赛A题及其数据 2020数学建模国赛A题及其数据2020数学建模国赛A题及其数据 2020数学建模国赛A题及其数据 2020数学建模国赛A题及其数据 2020数学建模国赛A题及其数据
Java8零基础入门视频教程
20160929这门课程基于主流的java8平台，由浅入深的详细讲解了java SE的开发技术，可以使java方向的入门学员，快速扎实的掌握java开发技术！
MySQL数据库从入门到实战课
20191231限时福利1：购课进答疑群专享柳峰（刘运强）老师答疑服务。 为什么说每一个程序员都应该学习MySQL？ 根据《20192020年中国开发者调查报告》显示，超83%的开发者都在使用MySQL数据库。 使用量大同时，掌握MySQL早已是运维、DBA的必备技能，甚至部分IT开发岗位也要求对数据库使用和原理有深入的了解和掌握。 学习编程，你可能会犹豫选择 C++ 还是 Java；入门数据科学，你可能会纠结于选择 Python 还是 R；但无论如何， MySQL 都是 IT 从业人员不可或缺的技能！ 【课程设计】 在本课程中，刘运强老师会结合自己十多年来对MySQL的心得体会，通过课程给你分享一条高效的MySQL入门捷径，让学员少走弯路，彻底搞懂MySQL。 本课程包含3大模块： 一、基础篇： 主要以最新的MySQL8.0安装为例帮助学员解决安装与配置MySQL的问题，并对MySQL8.0的新特性做一定介绍，为后续的课程展开做好环境部署。 二、SQL语言篇： 本篇主要讲解SQL语言的四大部分数据查询语言DQL，数据操纵语言DML，数据定义语言DDL，数据控制语言DCL，学会熟练对库表进行增删改查等必备技能。 三、MySQL进阶篇： 本篇可以帮助学员更加高效的管理线上的MySQL数据库；具备MySQL的日常运维能力，语句调优、备份恢复等思路。
 1.16MB
微信小程序 实例汇总 完整项目源代码
20161101微信小程序 实例汇总 完整项目源代码
《C语言/C++学习指南》语法篇（从入门到精通）
20150603一门初级、从入门到精通的C语言C++语法教程，由毕业于清华大学的业内人士执课。从简单的HelloWorld入门程序，到深入的C语言C++核心概念，均为您娓娓道来，言之必详、听之必懂。让C语言C++编程变得简单，让C语言C++编程变得有趣，让喜欢C语言C++的人学会C语言C++！
 5.85MB
SimpleScalar相关介绍、论文、实验精选（共10篇）
20090331所含文章如下： simplescalar简介.pdf SimpleScalar安装报告.doc simplescalar实验.pdf Cache低功耗技术研究及SimpleScalar模拟器分析.nh
 1.70MB
200个C语言程序（由简单到复杂）
20110526从简单到难的200来个经典C程序 第一部分 基础篇 001 第一个C程序 002 运行多个源文件 003 求整数之积 004 比较实数大小 005 字符的输出 006 显示变量所占字节数 007 自增
 38.68MB
2019数学建模历年题目及优秀论文
201904022019数学建模历年题目及优秀论文 ，好资源与大家分享！！
 65.8MB
java源码包java 源码 大量 实例
20130418Applet钢琴模拟程序java源码 2个目标文件，提供基本的音乐编辑功能。编辑音乐软件的朋友，这款实例会对你有所帮助。 Calendar万年历 1个目标文件 EJB 模拟银行ATM流程及操作源代码
 111.65MB
DirectX修复工具V4.0增强版
20200613DirectX修复工具(DirectX Repair)是一款系统级工具软件，简便易用。本程序为绿色版，无需安装，可直接运行。 本程序的主要功能是检测当前系统的DirectX状态，如果发现异常则进行修复
 下载 红色简约2021勇攀高峰年终总结新年计划PPT模板.zip
 下载 ASP.NET MVC5网站开发之登录、验证和注销管理员篇1（六）
 学院 Unity热更新框架基于ILRuntime
 学院 【数据分析】量化交易
 博客 基本操作
 博客 C语言任务（二）
 学院 Java微信小程序手机数码商城 大学生毕业设计教学视频
 下载 雷达电磁波三维探测范围可视化仿真
 学院 Netty教程：十二个实例带你轻松学习Netty
 博客 pytorch学习笔记之tensor的创建与切片
 博客 925. 长按键入
 博客 OpenStack Q版双机部署cinder
 下载 笔记本电池保养的五大错误观念
 下载 Yii2.0中的COOKIE和SESSION用法
 学院 JavaWeb母婴用品购物商城毕业设计 大学生毕业设计教学视频
 下载 高效微型太阳能逆变器测试方法
 学院 全平台OpenGL游戏技术(OSX/Windows/Android/iOS)
 学院 成神之路：8小时精通前端HTML5+CSS3
 下载 基础电子中的维库小知识：晶闸管的识别与检测
 博客 前端学习（2453）：项目初始化
 学院 PHP微信小程序珠宝首饰商城 大学生毕业设计 教学视频
 博客 SpringBoot2增删查改
 博客 内核定时器——操作系统课程设计
 下载 提高血糖仪系统设计效率
 博客 moviepy音视频剪辑：使用mask遮罩实现视频叠加透明效果
 学院 SkyEye智慧眼系统搭建 二
 学院 3小时快速学习计算机基础
 博客 看雷诺公司如何提高提高基于模型的开发效率
 学院 PHP实战：PHP后台权限管理系统（PHP原生开发课程）
 学院 UI自动化测试全家桶