前面回答过你10分钟分隔的，http://ask.csdn.net/questions/367345
自己改为5分钟啊。
2条回答

采纳
点赞 评论 复制链接分享

采纳
SELECT DATEADD(MINUTE, 1, TM) from 表
点赞 1 评论 复制链接分享
提交
相关推荐
 4年前回答 1 已采纳 Painting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones. Your task is counting the segments of different colors you can see at last. Input The first line of each data set contains exactly one integer n, 1 <= n <= 8000, equal to the number of colored segments. Each of the following n lines consists of exactly 3 nonnegative integers separated by single spaces: x1 x2 c x1 and x2 indicate the left endpoint and right endpoint of the segment, c indicates the color of the segment. All the numbers are in the range [0, 8000], and they are all integers. Input may contain several data set, process to the end of file. Output Each line of the output should contain a color index that can be seen from the top, following the count of the segments of this color, they should be printed according to the color index. If some color can't be seen, you shouldn't print it. Print a blank line after every dataset. Sample Input 5 0 4 4 0 3 1 3 4 2 0 2 2 0 2 3 4 0 1 1 3 4 1 1 3 2 1 3 1 6 0 1 0 1 2 1 2 3 1 1 2 0 2 3 0 1 2 1 Sample Output 1 1 2 1 3 1 1 1 0 2 1 1
 回答 3 已采纳 Description Graph algorithms form a very important part of computer science and have a lineage that goes back at least to Euler and the famous Seven Bridges of Konigsberg problem. Many optimization problems involve determining efficient methods for reasoning about graphs. This problem involves determining a route for a postal worker so that all mail is delivered while the postal worker walks a minimal distance, so as to rest weary legs. Given a sequence of streets (connecting given intersections) you are to write a program that determines the minimal cost tour that traverses every street at least once. The tour must begin and end at the same intersection. The ``reallife'' analogy concerns a postal worker who parks a truck at an intersection and then walks all streets on the postal delivery route (delivering mail) and returns to the truck to continue with the next route. The cost of traversing a street is a function of the length of the street (there is a cost associated with delivering mail to houses and with walking even if no delivery occurs). In this problem the number of streets that meet at a given intersection is called the degree of the intersection. There will be at most two intersections with odd degree. All other intersections will have even degree, i.e., an even number of streets meeting at that intersection. Input The input consists of a sequence of one or more postal routes. A route is composed of a sequence of street names (strings), one per line, and is terminated by the string ``deadend'' which is NOT part of the route. The first and last letters of each street name specify the two intersections for that street, the length of the street name indicates the cost of traversing the street. All street names will consist of lowercase alphabetic characters. For example, the name foo indicates a street with intersections f and o of length 3, and the name computer indicates a street with intersections c and r of length 8. No street name will have the same first and last letter and there will be at most one street directly connecting any two intersections. As specified, the number of intersections with odd degree in a postal route will be at most two. In each postal route there will be a path between all intersections, i.e., the intersections are connected. Output For each postal route the output should consist of the cost of the minimal tour that visits all streets at least once. The minimal tour costs should be output in the order corresponding to the input postal routes. Sample Input one two three deadend mit dartmouth linkoping tasmania york emory cornell duke kaunas hildesheim concord arkansas williams glasgow deadend Sample Output 11 114
 回答 1 已采纳 A number of students are members of a club that travels annually to exotic locations. Their destinations in the past have included Indianapolis, Phoenix, Nashville, Philadelphia, San Jose, and Atlanta. This spring they are planning a trip to Eindhoven. The group agrees in advance to share expenses equally, but it is not practical to have them share every expense as it occurs. So individuals in the group pay for particular things, like meals, hotels, taxi rides, plane tickets, etc. After the trip, each student's expenses are tallied and money is exchanged so that the net cost to each is the same, to within one cent. In the past, this money exchange has been tedious and time consuming. Your job is to compute, from a list of expenses, the minimum amount of money that must change hands in order to equalize (within a cent) all the students' costs. Input Standard input will contain the information for several trips. The information for each trip consists of a line containing a positive integer, n, the number of students on the trip, followed by n lines of input, each containing the amount, in dollars and cents, spent by a student. There are no more than 1000 students and no student spent more than $10,000.00. A single line containing 0 follows the information for the last trip. Output For each trip, output a line stating the total amount of money, in dollars and cents, that must be exchanged to equalize the students' costs. Sample Input 3 10.00 20.00 30.00 4 15.00 15.01 3.00 3.01 0 Sample Output $10.00 $11.99
 4年前回答 1 已采纳 Problem Description An engineering firm called ``Gears R Us" needs a program which can evaluate the operation of gears on a board. The board is a twodimensional mounting plane which allows gears with two levels of teeth (an inside radius closest to the board and an outside radius away from the board). The gears rotate around the center of their diameter and interact by turning an adjacent gear which it touches (either on the inside or outside radiuss) with a equal tangential velocity. Angular velocity is the same for both the inside and outside radius gears. ``Gears R Us" uses square mounting boards which have a 300×300 grid of mounting holes on 1 cm centers. When viewing the board, the lower left of the board is position x = 1, y = 1; the upper right of the board is position x = 300, y = 300. The gears mount only on mounting holes and are available with integer inside and outside radii between 1 and 100. The ``motor" gear is the only original source of energy of any board and is actually a gear (powered from behind the board) subject to all the restrictions described for gears above. The following diagram shows a sample configuration. In the above example, the motor is at location x = 20, y = 100; the inside and outside radii of the gears the motor drives are both 5 centimeters, and the motor is rotating to the left (counterclockwise) at 300 RPM's. By observation and computation, you can see that the motor touches (without overlapping) the inside radius of Gear #1. The inside radius of Gear #1 touches the inside radius of Gear #2 and Gear #3. The outside radius of Gear #3 touches the outside radius of Gear #4; the inside radius of Gear #4 touches the inside radius of Gear #5. Given the data in the above example, it is possible to compute that Gear #1 rotates to the right (clockwise) at 83.33 RPM's; Gear #2 rotates to the left (counterclockwise) at 187.50 RPM's; Gear #3 rotates to the left at 150.00 RPM's; Gear #4 rotates to the right at 281.25 RPM's; and Gear #5 rotates to the left at 33.75 RPM's. Although this example does not include any offnominal conditions, ``Gears R Us" needs your program to isolate two error conditions. The first error occurs when two or more gears would overlap at either the inner or outter radius. The second error condition occurs when any gear is being driven at two or more different speeds. It is valid for two or more gears to drive another gear at the same speed (and in the same direction). It is possible for a warning condition to occur when 1 or more gears are idle (ie rotation = 0.0). If this condition occurs, your program will have to print a warning message as described below. Input Input to your program consists of an undetermined number of configurations to be analyzed. Each set starts with a single line of six integers. The first two integers are the x, y coordinates of the motor (1 <= x, y <= 300); the next two integers are the inside and outside radii of the motor gear respectively (1 <= ir, or <= 100); the fifth integer is the rotational velocity (1 <= abs(AV) <= 1000) of the motor in RPM's (negative representing counterclockwise rotation and positive representing clockwise rotation); the sixth integer is the number of gears (1 <= NG <= 20) excluding the motor that are mounted on the board. Each of the following NG lines contain exactly 4 integers representing gears 1 through NG respectively. The first two integers represent the x, y coordinates (1 <= x, y <= 300) of the gear and the second pair of integers represent the inside and outside radii of the gear respectively (1 <= ir, or <= 100). Output For each input set, your program should print either a list of the gears and the rotation value for each or one of two error messages. The first line of each output set should be a line containing only ``Simulation #X" where X is the simulation number (starting with 1) and is leftjustified starting in column 13. If there are no errors, lines 2 through NG+1 of the output set should contain the gear number rightjustified in columns 1 and 2, a colon in column 3, either a `L' for counterclockwise rotation of the gear or a `R' for clockwise rotation in column 5, and the magnitude of the rotation always printed with two digits to the right of the decimal point and are leftjustified starting in column 7. If any gear has rotation of magnitude zero, you should print the message ``Warning  Idle Gear" in columns 5 through 24 instead of the rotation direction and magnitude. If there is an error, your program should print only the first line containing ``Simulation #X" and a second line containing only one of two error messages leftjustified in column 1. If there is an overlapping of two or more gears at either in inner or outter radii, your program should print the message ``Error  Overlapping Gears". If there is any gear which is being driven by two or more different vectors, your program should print the message ``Error  Conflicting Gear Rotation". Your program should give precedence to the overlapping error condition. The last line of output for each output set should be an empty line. Sample Input 20 100 5 5 300 5 43 100 18 10 43 74 8 4 71 100 10 15 94 100 3 8 122 100 25 6 20 100 5 5 300 5 43 100 18 10 43 74 8 4 71 100 10 10 89 100 3 8 105 100 25 6 20 100 5 5 300 5 43 100 18 10 43 74 8 4 71 100 10 10 89 100 3 8 125 100 25 6 Sample Output Simulation #1 1: R 83.33 2: L 187.50 3: L 150.00 4: R 281.25 5: L 33.75 Simulation #2 Error  Overlapping Gears Simulation #3 1: R 83.33 2: L 187.50 3: L 150.00 4: R 187.50 5: Warning  Idle Gear
 5年前回答 1 已采纳 Description Almost anyone who has ever taken a class in computer science is familiar with the "Game of Life," John Conway's cellular automata with extremely simple rules of birth, survival, and death that can give rise to astonishing complexity. The game is played on a rectangular field of cells, each of which has eight neighbors (adjacent cells). A cell is either occupied or not. The rules for deriving a generation from the previous one are: If an occupied cell has 0, 1, 4, 5, 6, 7, or 8 occupied neighbors, the organism dies (0, 1: of loneliness; 4 thru 8: of overcrowding). If an occupied cell has two or three occupied neighbors, the organism survives to the next generation. If an unoccupied cell has three occupied neighbors, it becomes occupied (a birth occurs). One of the major problems researchers have looked at over the years is the existence of socalled "Garden of Eden" configurations in the Game of Life  configurations that could not have arisen as the result of the application of the rules to some previous configuration. We're going to extend this question, which we'll call the "Game of Efil": Given a starting configuration, how many possible parent configurations could it have? To make matters easier, we assume a finite grid in which edge and corner cells "wrap around" (i.e., a toroidal surface). For instance, the 2 by 3 configuration: has exactly three possible parent configurations; they are: You should note that when counting neighbors of a cell, another cell may be counted as a neighbor more than once, if it touches the given cell on more than one side due to the wrap around. This is the case for the configurations above. Input There will be multiple test cases. Each case will start with a line containing a pair of positive integers m and n, indicating the number of rows and columns of the configuration, respectively. The next line will contain a nonnegative integer k indicating the number of "live" cells in the configuration. The following k lines each contain the row and column number of one live cell, where row and column numbering both start at zero. The final test case is followed by a line where m = n = 0  this line should not be processed. You may assume that the product of m and n is no more than 16. Output For each test case you should print one line of output containing the case number and the number of possible ancestors. Imitate the sample output below. Note that if there are 0 ancestors, you should print out Garden of Eden. Sample Input 2 3 2 0 0 0 1 3 3 4 0 0 0 1 0 2 1 1 3 3 5 0 0 1 0 1 2 2 1 2 2 0 0 Sample Output Case 1: 3 possible ancestors. Case 2: 1 possible ancestors. Case 3: Garden of Eden.
 4年前回答 1 已采纳 Problem Description There are two white pieces and one black king () on a chess board. Each of the white pieces is a rook (), a bishop (), or a queen (). White starts. You’re playing for White and need to checkmate the black king as soon as possible. Write a program that will determine the minimum number of moves White needs to perform to checkmate black king, assuming Black follows the best possible strategy for prolonging the game. Some information about the chess rules: 1. The position described above is not legal in chess since there is no white king on the board. Also, two queens of the same color cannot exist on the board. Apart from that the game is according to the chess rules. 2. The board size is 8×8 cells. Columns of the board are labeled by the letters a to h, and the rows by the digits 1 to 8. 3. The players (White and Black) alternately move one piece of their own color at a time. In the context of this problem we’re only counting moves made by White. 4. The rook moves horizontally or vertically, through any number of unoccupied squares. It cannot jump over or stay in the same cell as another piece of the same color. 5. The bishop moves diagonally, through any number of unoccupied squares. It cannot jump over or stay in the same cell as another piece of the same color. 6. The queen moves horizontally, vertically or diagonally, through any number of unoccupied squares. It cannot jump over or stay in the same cell as another piece of the same color. 7. A check is a threat to capture the king on the next move turn. 8. A king can move one square in any direction (horizontally, vertically, or diagonally) unless the move would place the king in check. If this condition holds, it’s not prohibited for king to take over a cell already occupied by one of the white pieces. In this case the rook is removed from play altogether. 9. Checkmate is a position in which a king is threatened with capture (i.e. is in check) and there is no legal move to escape the threat. 10. Stalemate is a situation where the player whose turn it is to move is not in check but has no legal move. The rules of chess provide that when stalemate occurs, the game ends as a draw (which is not acceptable for White). Input The first line of the input contains the number of positions (which is at most 150 000), and each of the following lines contain the description of a single position. A position is represented by the location of the three pieces on the board: the black king first and then the two white pieces with typespecifying character. ‘R’ means rook, ‘B’ means bishop, and ‘Q’ means queen. It’s guaranteed that no two pieces share a cell and there is no check at the initial position. Output Output one line for each position in the input. The line should contain the minimum number of moves which White needs to make to guarantee the checkmate, starting from the corresponding position. In case it’s not possible to reach the goal, output 0 for that position. Sample Input 2 c7 R f1 R g6 f5 B b3 R h3 Sample Output 2 0
 回答 1 已采纳 Clearly the economy is bound to pick up again soon. As a forwardthinking Internet entrepreneur, you think that the 'Net will need a new search engine to serve all the people buying new computers. Because you're frustrated with the poor results most search engines produce, your search engine will be better. You've come up with what you believe is an innovative approach to document matching. By giving weight to the number of times a term appears in both the search string and in the document being checked, you believe you can produce a more accurate search result. Your program will be given a search string, followed by a set of documents. You will calculate the score for each document and print it to output in the order the document appears in the input. To calculate the score for a document you must first calculate the term score for each term appearing in the search string. A term score is the number of times a term occurs in the search string multiplied by the number of times it occurs in the document. The document score is the sum of the square roots of each term score. Input Format: The input consists of a set of documents separated by single lines containing only ten dashes, ����. No line will be longer than 250 characters. No document will be longer than 100 lines. The first document is the search string. The input terminates with two lines of ten dashes in a row. The input documents will use the full ASCII character set. You must parse each document into a set of terms. Terms are separated by whitespace in the input document. Comparisons between terms are caseinsensitive. Punctuation is removed from terms prior to comparisons, e.g. ��don't�� becomes ��dont��. The resulting terms should contain only the characters {[az],[09]}. A term in the input consisting only of punctuation should be ignored. You may assume the search string and each document will have at least one valid term. Output Format: The output is a series of scores, one per line, printed to two decimal places. The scores are printed in the order the documents occur in the input. No other characters may appear in the output. This problem contains multiple test cases! The first line of a multiple input is an integer N, then a blank line followed by N input blocks. Each input block is in the format indicated in the problem description. There is a blank line between input blocks. The output format consists of N output blocks. There is a blank line between output blocks. Sample Input: 1 fee fi fo fum  fee, fi, fo! fum!!  fee fee fi, me me me   Sample Output: 4.00 2.41
 yuanmeng001的博客 Relativity: The Special and General Theory Albert Einstein Albert Einstein 2 Relativity: The Special and General Theory Table of Contents Written: 1916 Source: Relativity: The Special and General Theo...
 ztenv的博客 The kernel’s commandline parameters The following is a consolidated list of the kernel parameters as implemented by the __setup(), early_param(), core_param() and module_param() macros and sorted into English Dictionary order (defined as ignoring all pun
 禅与计算机程序设计艺术的博客 Template engines 1. Introduction Groovy supports multiple ways to generate text dynamically includingGStrings,printfandMarkupBuilderjust to name a few. In addition to these, there is a dedicate...
 qwfys200的博客 This article introduces you to the man document of the aptitude command.
 太阳火神的美丽人生的博客 iOS 各版本中的新特性（What's New in iOS） 目录翻译完成
 u010019717的博客 Unity 5.0Unity 5.0 is our biggest and boldest release ever. Powerful new features in Unity 5 include:The Physicallybased Standard Shader to make your materials look consistent in any lighting envir
 太阳火神的美丽人生的博客 Java Secure Socket Extension (JSSE) Reference Guide
 snsn1984的博客 Clang内部手册，是介绍Clang内部的设计和主要内容的最重要的文档，是hacking Clang所必不可缺少的一个文档。
 fosoyo的博客 DXperienceUniversal 9.1.0包含DevExpress所有的.net产品(Refactor!Pro CodeRush DXperience DevExpress eXpressAppFramework) download：http://fosoyo.download.csdn.net/ Whats New in DXperience v2009 vol 1
 yongyinmg的博客 from: https://developer.apple.com/library/ios/documentation/General/Conceptual/CocoaTouch64BitGuide/ConvertingYourAppto64Bit/ConvertingYourAppto64Bit.html#//apple_ref/doc/uid/TP40013501CH3SW1 C
 it1988888的博客 The GNU C Library Short Contents Main Menu1 Introduction2 Error Reporting3 Virtual Memory Allocation And Paging4 Character Handling5 String and Array Utilities6 Character Set Handling7 Locales a
 软件真理与光的博客 Google C++ Style Guide http://googlestyleguide.googlecode.com/svn/trunk/cppguide.xml Google C++ Style Guide Revision 3.180 Benjy We
 4年前yy27590845的博客 Accelerated C++ Practical Programming by Example by Andrew Koenig and Barbara E. Moo AddisonWesley, 2000 ISBN 020170353X Pages 336 Second Printing Table of Contents Contents Chapter 0 Get