 Ranking List

Description
Background
We knew something would be missing. We have just noticed that we do not have a tool helping us with the ranking list for this programming contest, and if we tried to create it by hand, you would probably end up waiting for the results until Sunday. So please help us out here, will you?
Problem
Your task is to write a program that determines the ranking list for a programming contest. You are given a list of the participating teams and a log file describing all the solutions submitted by the teams.
The scoring of this programming contest is based on the following set of rules:
The Contest Judges are solely responsible for determining the correctness of submitted runs. The winners of the Contest are determined by the Contest Judges and the Contest Director. The Contest Judges are empowered to adjust for or adjudicate unforeseen events and conditions.
Teams will be ranked by the total number of correct solutions. For the purpose of awards, or in determining qualifier(s) for the ACM Contest, teams who solve the same number of problems are ranked by least total time. If this results in a draw situation the least number of attempts for each solved problems are taken into account. First the number of submissions for the problem with the most attempts are compared.
The total time is the sum of the time consumed for each problem solved. The time consumed for a solved problem is the time elapsed from the beginning of the contest to the submittal of the accepted run plus 20 penalty minutes for every rejected run for that problem regardless of submittal time. There is no time consumed for a problem that is not solved.We are sure that you know all this. However, we think that the provisions of the second rule for resolving a draw situation are somewhat obscure, so that we do not want your program to implement such a procedure.Instead, if there is a draw situation of two or more teams with the same total number of correct solutions and the same total time, assign the same rank to these teams and list them in alphabetical order. Their relative ranking will be determined by the contest director, based on the number of attempts for each solved problems or the earliest problem solved.
As we want the rank r of a team to indicate that r1 teams did better, we need to adjust the numbers in a draw situation. If, for example, the two best teams' numbers of solved problems and total times coincide,they would both get rank 1, while the next team would be assigned rank 3. In this example, nobody would be assigned rank 2 by your program.
We also have an addition to the third rule: There will be no penalty for incorrect solutions submitted after a correct solution was accepted from the same team.
InputThe first line contains the number of scenarios.
For each scenario, you find the number n, 1 <= n <= 20, of teams in the first line and the (unique) names of the teams in the n following lines. A team name is a single word of length at most 8 containing letters and digits only, and for your convenience the teams are listed in alphabetical order. The next line contains the number k of problems and the number m of solutions that were submitted (1 <= k < 10, 0 <= m <= 2000). Each of the following m lines describes one such solution, in the format "problem time correctness team", where 1 <= problem <= k is the number of the problem,0 <= time < 300 is the number of minutes elapsed since the contest was started, correctness is either "Yes" or "No" and team is the name of the team that submitted the solution. You can assume that the lines in the log file are sorted by time.
OutputFor each scenario print a ranking list containing every team that participated in the contest. The format is "rank. team solved time", where rank is the rank, team the name of the team, solved the number of correct solutions, and time the total time. In addition to the single blanks separating these four fields, make the table look nice by using a field width of 2 for the rank, 8 for the team's name, 1 for the number of problems solved and 4 for the total time (name leftadjusted, numbers rightadjusted, see sample output). Each scenario ends with a blank line.
Sample Input2
10
Team1
Team2
Team3
Team4
Team5
Team6
Team7
Team8
Team9
slowTeam
8 14
1 18 Yes Team4
1 57 Yes Team2
1 87 Yes Team3
1 101 Yes Team1
2 103 Yes Team5
2 120 Yes Team6
6 141 Yes Team7
1 147 No Team1
7 156 Yes Team2
5 167 Yes Team8
2 167 Yes Team9
5 170 No Team4
5 175 Yes Team4
1 234 No slowTeam
1
Team1
8 0
Sample Output Team2 2 213
 Team4 2 213
 Team3 1 87
 Team1 1 101
 Team5 1 103
 Team6 1 120
 Team7 1 141
 Team8 1 167

Team9 1 167
 slowTeam 0 0
Team1 0 0
c语言题目，变形的斐波那契数列，在acm上为何时间超限_course
20171111There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n1) + F(n2) (n>=2) Input Input consists of a sequence of lines, each containing an integer n. (n < 1,000,000) Output Print the word "yes" if 3 divide evenly into F(n). Print the word "no" if not. Sample Input 0 1 2 3 4 5 Sample Output no no yes no no no
Text Formalization _course
20161220Description One duty Jimmy has at the ACM is to formalize the language and grammar used in texts. Part of this job is expanding contractions and certain acronyms. A contraction in English is a word or phrase formed by omitting or combining some of the sounds of a longer phrase. For example, "don't" is a contraction for "do not" and "o'clock" comes from "of the clock." An acronym is a series of letters (or word) formed from the initial letters of a name or from combining parts of a series of words. For example, "ACM" for "Association for Computing Machinery" or "radar" for "radio detecting and ranging." Your job is to take a list of contractions and acronyms, and expand all contractions and some acronyms in a text. Input Input begins with two numbers, C < 50 and A < 50, indicating respectively the number of contractions and acronyms Jimmy must expand. The next C lines list a contraction and its formal expansion. Following will be a list of A acronyms and their expansions, each on individual lines. Both contractions and acronyms will be presented in the following format: "contraction or acronym" > "expansion" Since contractions, acronyms and expansions may contain spaces, each will be enclosed in quotation marks and be no more than 80 characters in length. Following the lists of contractions and acronyms will be a series of texts to expand. Each text will consist of lines no longer than 80 characters. No contraction or acronym will be split over multiple lines. A text will be terminated with a line consisting only of the character '#'. Output Output each text exactly as input, except for necessary expansions. All contractions must be fully expanded. Each contraction may appear as listed, entirely uppercase, or capitalized (first letter uppercase, remaining letters as listed). The expansion should follow the same rule; if a contraction is uppercased, the expansion should be uppercased as well. If more than one case applies, choose the earliest matching case in the list: "as listed," "uppercased," and "capitalized." Since acronyms are useful for understanding and identifying names, only modify the first instance of an acronym in each text. An instance of an acronym must match the case exactly ("acm" is not an instance of "ACM"). The modification consists of replacing the acronym with the expansion, followed by a space, followed by the acronym in brackets. This allows the reader to connect the acronym with the fully expanded term. The terminating line of '#' should be printed after each text. If more than one expansion or acronym match can be valid, use the one which starts earlier in the text. If several begin at the same letter, use the one appearing earliest in the input lists. Use the sample below to illustrate the process. Sample Input 3 2 "doesn't" > "does not" "isn't" > "is not" "can't" > "cannot" "ACM" > "Association for Computing Machinery" "CS" > "Computing Science" The ACM can't solve all the problems in CS. Though large and having many resources at its disposal, the ACM doesn't use magic. Magic isn't part of science, and hence not part of CS. Thank you for your suggestions. Signed, ACM # The ACM doesn't like magic. It's not that the ACM won't use it, it's just that the ACM doesn't understand magic. # Sample Output The Association for Computing Machinery (ACM) cannot solve all the problems in Computing Science (CS). Though large and having many resources at its disposal, the ACM does not use magic. Magic is not part of science, and hence not part of CS. Thank you for your suggestions. Signed, ACM # The Association for Computing Machinery (ACM) does not like magic. It's not that the ACM won't use it, it's just that the ACM does not understand magic. #
TT _course
20171204Problem Description Association of Collision Management (ACM) is planning to perform the controlled collision of two asteroids. The asteroids will be slowly brought together and collided at negligible speed. ACM expects asteroids to get attached to each other and form a stable object. Each asteroid has the form of a convex polyhedron. To increase the chances of success of the experiment ACM wants to bring asteroids together in such manner that their centers of mass are as close as possible. To achieve this, ACM operators can rotate the asteroids and move them independently before bringing them together. Help ACM to find out what minimal distance between centers of mass can be achieved. For the purpose of calculating center of mass both asteroids are considered to have constant density. Input Input file contains two descriptions of convex polyhedra. The first line of each description contains integer number n indicate the number of vertices of the polyhedron (4 <= n <= 60). The following n lines contain three integer numbers xi; yi; zi each  the coordinates of the polyhedron vertices (10000 <= xi, yi, zi <= 10000). It is guaranteed that the given points are vertices of a convex polyhedron, in particular no point belongs to the convex hull of other points. Each polyhedron is nondegenerate. The two given polyhedra have no common points. Output Output one floating point number  the minimal distance between centers of mass of the asteroids that can be achieved. Your answer must be round up to 0.01. Sample Input 8 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 5 0 0 5 1 0 6 1 0 6 0 1 6 0 1 6 Sample Output 0.75
Agents _course
20171011Description The topsecret organization Agency of C.M. (The agency is so secretive that nobody is allowed to know what C.M. was supposed to mean. The most common interpretation  "Crazy Madmen"  is vehemently, but of course futilely, denied by leadership of the ACM.) was given a difficult mission. In order to complete the mission, all agents of ACM must be used. To make the situation worse, it is known that certain pairs of agents hate each other or simply do not work well together for some other reasons. Therefore to increase the efficiency, the leader of ACM has decided to split his subordinates to several teams, so that no such pair of agents belongs to the same team. The nature of the mission however makes it impossible to have more than three teams. At first this seemed to be an easy task, but he quickly noticed that there are some quite unpleasant persons in his organization. Such "bad guys" are of course necessary in this type of organizations, since there are tasks that simply cannot be solved in the "gentle" way. There used to be a lot more of them, but after recent reforms, the regulations only permit at most three (but at least one) such characters in the organization. Still, he found out that each normal (i.e. not bad guy) member of the organization hates at least one of these bad guys, which made him doubt that such a split is possible. Your task is to decide whether he is right with his doubts, or whether splitting the agents to at most three teams according to the criterion described above is possible. Input The input consists of several instances. The first line of each instance contains two integers 1 <= A <= 500 and R >= 0 separated by a single space. A is the number of agents in the organization. Agents are assigned integers between 0 and A  1. R is the number of pairs of agents that hate each other. The following R lines of the instance describe these pairs. Each of the lines contains two integers 0 <= a1, a2 < A separated by a single space, meaning that agents with numbers a1 and a2 hate each other. Every pair of agents that hate each other is described exactly once. An empty line follows each instance. The input is terminated by a line containing two zeros. Output The output consists of several lines. The ith line of the output corresponds to the ith input instance. If it is possible to split the agents in the instance to at most three teams, the corresponding output line describes such a split. If there are several possible splits, then only one (arbitrary) of them is described. The line contains A integers in {0, 1, 2} separated by single spaces, where the ith number is the number of the team to that the agent with number (i  1) is assigned. If it is not possible to split the agents in the instance so that no two persons in the same team hate each other, the corresponding output line consists of the string "The agents cannot be split". Sample Input 3 3 0 1 0 2 2 1 4 6 0 1 0 2 0 3 1 2 1 3 2 3 0 0 Sample Output 0 1 2 The agents cannot be split
Japan _course
20170405Japan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the East coast and M cities on the West coast (M <= 1000, N <= 1000). K superhighways will be build. Cities on each coast are numbered 1, 2, ... from North to South. Each superhighway is straight line and connects city on the East coast with city of the West coast. The funding for the construction is guaranteed by ACM. A major portion of the sum is determined by the number of crossings between superhighways. At most two superhighways cross at one location. Write a program that calculates the number of the crossings between superhighways. Input The input starts with T  the number of test cases. Each test case starts with three numbers  N, M, K. Each of the next K lines contains two numbers  the numbers of cities connected by the superhighway. The first one is the number of the city on the East coast and second one is the number of the city of the West coast. Output For each test case write one line on the standard output: Test case [case number]: [number of crossings] Sample Input 1 3 4 4 1 4 2 3 3 2 3 1 Sample Output Test case 1: 5
Document Indexing _course
20170222Andy is fond of old computers. He loves everything about them and he uses emulators of old operating systems on his modern computer. Andy also likes writing programs for them. Recently he has decided to write a text editor for his favorite textmode operating system. The most diffcult task he has got stuck with is document indexing. An index of the document is the lexicographically ordered list of all words occurring in the document with the numbers of pages they occur at. Andy feels that he is not able to write the component of the editor that performs indexing, so he asks you to help. A document is a sequence of paragraphs. Each paragraph consists of one or more lines. Paragraphs are separated from each other with exactly one blank line. First, the document is paginated  divided into pages. Each page consists of up to n lines. Lines are placed on the page one after another, until n lines are placed. The following correction rules are then applied: If the last line on a page is the last line of the paragraph, then the following empty line is skipped, i.e. it is not placed on any page. Therefore, the page never starts with a blank line. If the last line on a page is the first line of a paragraph that contains more than one line (so called orphan line), then it is moved to the next page. If the last line on a page is the nexttolast line of a paragraph that contains more than three lines, then this line is moved to the next page (otherwise, the last line of the paragraph would be alone on the page  so called widow line). If the last line on a page is the nexttolast line of a paragraph that contains exactly two or three lines, then the whole paragraph is moved to the next page (so we have neither orphan, nor widow lines). After applying the correction rules the next page is formed, and so on until the whole document is paginated. A word is a continuous sequence of letters of the English alphabet. Case is not important. The index of the document contains each word from the document and the list of the pages it occurs at. The numbers of pages a word occurs at must be listed in the ascending order. Numbers must be separated by commas. If a word occurs on three or more consecutive pages, only the first and the last page numbers of this range must be listed, separated by a dash, for example "35,710,12,13,15". Input There are several test cases in the input. The first line of each case contains n (4 ≤ n ≤ 100). The rest of the input file contains the document to be indexed. The size of the input file does not exceed 20 000 bytes. The line is considered blank if it is completely empty. No line contains leading or trailing spaces. The document does not contain two consecutive blank lines. The first line of the document is not blank. The length of each line of the document does not exceed 200 characters. Output Print all words that occur in the given document. Words must be printed in the lexicographical order, one word on a line. After each word print one space followed by the list of pages it occurs at, formatted as described in problem statement. Use capital letters in output. Sample Input 6 From thousands of teams competing in regional contests held from September to December 2004 worldwide, seventyfive teams will advance to the World Finals in Shanghai, April 37, 2005. Awards, prizes, scholarships, and bragging rights will be at stake for some of the world's finest university students of the computing science. Join us for the challenge, camaraderie, and the fun! Become the best of the best of the best in ACM ICPC! ACM ICPC is the best contest! Sample Output ACM 3 ADVANCE 1 AND 2,3 APRIL 1 AT 2 AWARDS 2 BE 2 BECOME 3 BEST 3 BRAGGING 2 CAMARADERIE 3 CHALLENGE 3 COMPETING 1 COMPUTING 2 CONTEST 3 CONTESTS 1 DECEMBER 1 FINALS 1 FINEST 2 FIVE 1 FOR 2,3 FROM 1 FUN 3 HELD 1 ICPC 3 IN 1,3 IS 3 JOIN 3 OF 13 PRIZES 2 REGIONAL 1 RIGHTS 2 S 2 SCHOLARSHIPS 2 SCIENCE 2 SEPTEMBER 1 SEVENTY 1 SHANGHAI 1 SOME 2 STAKE 2 STUDENTS 2 TEAMS 1 THE 13 THOUSANDS 1 TO 1 UNIVERSITY 2 US 3 WIDE 1 WILL 1,2 WORLD 1,2
Invitation Cards _course
20170312In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, most of all, Antique Comedies. They have printed invitation cards with all the necessary information and with the programme. A lot of students were hired to distribute these invitations among the people. Each student volunteer has assigned exactly one bus stop and he or she stays there the whole day and gives invitation to people travelling by bus. A special course was taken where students learned how to influence people and what is the difference between influencing and robbery. The transport system is very special: all lines are unidirectional and connect exactly two stops. Buses leave the originating stop with passangers each half an hour. After reaching the destination stop they return empty to the originating stop, where they wait until the next full half an hour, e.g. X:00 or X:30, where 'X' denotes the hour. The fee for transport between two stops is given by special tables and is payable on the spot. The lines are planned in such a way, that each round trip (i.e. a journey starting and finishing at the same stop) passes through a Central Checkpoint Stop (CCS) where each passenger has to pass a thorough check including body scan. All the ACM student members leave the CCS each morning. Each volunteer is to move to one predetermined stop to invite passengers. There are as many volunteers as stops. At the end of the day, all students travel back to CCS. You are to write a computer program that helps ACM to minimize the amount of money to pay every day for the transport of their employees. Input The input consists of N cases. The first line of the input contains only positive integer N. Then follow the cases. Each case begins with a line containing exactly two integers P and Q, 1 <= P,Q <= 1000000. P is the number of stops including CCS and Q the number of bus lines. Then there are Q lines, each describing one bus line. Each of the lines contains exactly three numbers  the originating stop, the destination stop and the price. The CCS is designated by number 1. Prices are positive integers the sum of which is smaller than 1000000000. You can also assume it is always possible to get from any stop to any other stop. Output For each case, print one line containing the minimum amount of money to be paid each day by ACM for the travel costs of its volunteers. Sample Input 2 2 2 1 2 13 2 1 33 4 6 1 2 10 2 1 60 1 3 20 3 4 10 2 4 5 4 1 50 Sample Output 46 210
Contestants Division _course
20171004Description In the new ACMICPC Regional Contest, a special monitoring and submitting system will be set up, and students will be able to compete at their own universities. However there’s one problem. Due to the high cost of the new judging system, the organizing committee can only afford to set the system up such that there will be only one way to transfer information from one university to another without passing the same university twice. The contestants will be divided into two connected regions, and the difference between the total numbers of students from two regions should be minimized. Can you help the juries to find the minimum difference? Input There are multiple test cases in the input file. Each test case starts with two integers N and M, (1 ≤ N ≤ 100000, 1 ≤ M ≤ 1000000), the number of universities and the number of direct communication line set up by the committee, respectively. Universities are numbered from 1 to N. The next line has N integers, the Kth integer is equal to the number of students in university numbered K. The number of students in any university does not exceed 100000000. Each of the following M lines has two integers s, t, and describes a communication line connecting university s and university t. All communication lines of this new system are bidirectional. N = 0, M = 0 indicates the end of input and should not be processed by your program. Output For every test case, output one integer, the minimum absolute difference of students between two regions in the format as indicated in the sample output. Sample Input 7 6 1 1 1 1 1 1 1 1 2 2 7 3 7 4 6 6 2 5 7 0 0 Sample Output Case 1: 1
SelfReplicating Numbers _course
20161213Description Vasya's younger brother Misha is fond of playing with numbers. Two days ago he discovered that 93762 = 87909376  the last four digits constitute 9376 again. He called such numbers selfreplicating. More precisely, an ndigit number is called selfreplicating if it is equal to the number formed by the last n digits of its square. Now Misha often asks Vasya to help him to find new such numbers. To make the things worse Vasya's brother already knows what the scales of notation are, so he asks Vasya to find, forexample, hexadecimal or binary selfreplicating numbers. Vasya wants to help his brother, but unfortunately he is very busy now: he is seriously preparing and training for the next ACM Regional Contest. So he asked you to write a program that for a given base b and length n will find all ndigit selfreplicating numbers in the scale of notation with base b. Input The only line of the input contains two numbers b and n separated by a single space, the base b of the scale of notation (2 <= b <= 36) and required length n (1 <= n <= 2000). Output The first line of the output contains K  the total number of selfreplicating numbers of length n in base b. Next K lines contain one ndigit number in base b each. Uppercase Latin characters from A to Z must be used to represent digits from 10 to 35 when b > 10. The selfreplicating numbers can be listed in arbitrary order. Sample Input 12 6 Sample Output 2 1B3854 A08369
The Game of MasterMind _course
20171017Description If you want to buy a new cellular phone, there are many various types to choose from. To decide which one is the best for you, you have to consider several important things: its size and weight, battery capacity, WAP support, colour, price. One of the most important things is also the list of games the phone provides. Nokia is one of the most successful phone makers because of its famous Snake and Snake II. ACM wants to make and sell its own phone and they need to program several games for it. One of them is MasterMind, the famous board logical game. The game is played between two players. One of them chooses a secret code consisting of P ordered pins, each of them having one of the predefined set of C colours. The goal of the second player is to guess that secret sequence of colours. Some colours may not appear in the code, some colours may appear more than once. The player makes guesses, which are formed in the same way as the secret code. After each guess, he/she is provided with an information on how successful the guess was. This feedback is called a hint. Each hint consists of B black points and W white points. The black point stands for every pin that was guessed right, i.e. the right colour was put on the right position. The white point means right colour but on the wrong position. For example, if the secret code is "white, yellow, red, blue, white" and the guess was "white, red, white, white, blue", the hint would consist of one black point (for the white on the first position) and three white points (for the other white, red and blue colours). The goal is to guess the sequence with the minimal number of hints. The new ACM phone should have the possibility to play both roles. It can make the secret code and give hints, but it can also make its own guesses. Your goal is to write a program for the latter case, that means a program that makes MasterMind guesses. Input There is a single positive integer T on the first line of input. It stands for the number of test cases to follow. Each test case describes one game situation and you are to make a guess. On the first line of each test case, there are three integer numbers, P, C and M. P ( 1 <= P <= 10) is the number of pins, C (1 <= C <= 100) is the number of colours, and M (1 <= M <= 100) is the number of already played guesses. Then there are 2 x M lines, two lines for every guess. At the first line of each guess, there are P integer numbers representing colours of the guess. Each colour is represented by a number Gi, 1 <= Gi <= C. The second line contains two integer numbers, B and W, stating for the number of black and white points given by the corresponding hint. Let's have a secret code S1, S2, ... SP and the guess G1, G2, ... GP. Then we can make a set H containing pairs of numbers (I,J) such that SI = GJ, and that any number can appear at most once on the first position and at most once on the second position. That means for every two different pairs from that set, (I1,J1) and (I2,J2), we have I1 <> I2 and J1 <> J2. Then we denote B(H) the number of pairs in the set, that meet the condition I = J, and W(H) the number of pairs with I <> J. We define an ordering of every two possible sets H1 and H2. Let's say H1 <= H2 if and only if one of the following holds: B(H1) < B(H2), or B(H1) = B(H2) and W(H1) <= W(H2) Then we can find a maximal set Hmax according to this ordering. The numbers B(Hmax) and W(Hmax) are the black and white points for that hint. Output For every test case, print the line containing P numbers representing P colours of the next guess. Your guess must be valid according to all previous guesses and hints. The guess is valid if the sequence could be a secret code, i.e. the sequence was not eliminated by previous guesses and hints. If there is no valid guess possible, output the sentence You are cheating!. If there are more valid guesses, output the one that is lexicographically smallest. I.e. find such guess G that for every other valid guess V there exists such a number I that: GJ = VJ for every J < I, and GI < VI. Sample Input 3 4 3 2 1 2 3 2 1 1 2 1 3 2 1 1 4 6 2 3 3 3 3 3 0 4 4 4 4 2 0 8 9 3 1 2 3 4 5 6 7 8 0 0 2 3 4 5 6 7 8 9 1 0 3 4 5 6 7 8 9 9 2 0 Sample Output 1 1 1 3 You are cheating! 9 9 9 9 9 9 9 9
Ancient Relics _course
20170506An expedition team traveled around the world to find ancient relics. This time they found a mysterious ruin deep in a forest in Africa. There must be treasure in the ruin, but a locked door stopped them. To make their way, they tried to break the door, but obviously it was sealed by ancient spells and immune to physical damages. They were just about to give up when some one in the team found several lines of ancient writings carved on the ground in front of the door. They were sure that the key to the door was encrypted in those lines. Now they are asking for your help. The first line will be referred to as a query, and words in the query are referred to as keywords. The remaining lines are referred to as the document. The door shall open once you find the "best" set of lines in the document. Comparing two sets of lines, namely A and B, the following rules apply. > If A contains more keywords than B, A is better than B; > If A and B contain the same number of keywords, we compare the keywords they contain. If A contains a keyword that B does not contain, and this keyword appears earlier in the query than any other keywords B contains while A doesn't, it makes A better; > If A and B contain exactly the same set of keywords, the set with less lines is better; > If the tie remains, we compare the lines they contain. If A contains a line that B does not contain, and this line appears earlier in the document than any other lines B contain while A doesn't, A is the better one. Input Description Standard input will contain multiple test cases. The first line of the input is a single integer T (1 <= T <= 10) which is the number of test cases. T test cases follow, each preceded by a single blank line. The first line of each test case is a single integer L (1 <= L <= 31), which is the number of lines carved on the ground. The following L lines are translated into English alphabets for you. Each line has zero or more words consisting of letters only (case sensitive) and separated with spaces. The query will contain no more than 10 keywords. Keywords within a query are unique. Output Description Results should be directed to standard output. Start each case with "Case #:" on a single line, where # is the case number starting from 1. Two consecutive cases should be separated by a single blank line. No blank line should be produced after the last test case. Let S be the best set of lines. If S contains at least one line, print all the keywords contained in S on the first line, in their original order in the query. Separate two keywords with a single space, and leave no space at the end of the line. Print all the line numbers S contains on the second line, in ascending order. Separate two line numbers with a single space, and leave no space at the end of the line. The first line number in the document (excluding the query) is 0. If S contains 0 lines, print the sentence "No keyword is found!" on a single line. Sample Input 3 2 Hello World the very first demo in various programming language courses 4 ACM ICPC you are welcome you are attending ACM ICPC regional context held by Zhejiang University good luck 3 We are in a good place We are in China China is a good place Sample Output Case 1: No keyword is found! Case 2: ACM ICPC 1 Case 3: We are in a good place 0 1
Calendar of Events _course
20170808Description Marketing people are very creative and must regularly attend many creative meetings. In the past, the meetings used to repeat every week. Now, there are so many of them, that the period must have been changed to one month. The monthly schedule of ACM now contains one meeting for each of the first N days in every month (including weekends). Meetings are identified by nonnegative integer numbers. Recently, ACM found out that the schedule must be reorganized and the order of meetings changed. The new order has already been chosen. The only problem is that the meetingplanning department has very limited privileges and must follow many directives that are in effect. It fact, the only change that the department is allowed to do, is to issue a request to reverse the order of meetings in the first D days of the month (D may be selected arbitrarily). For example, if the current schedule is “1 2 3 4 5” and the department issues a request to reverse the first 3 days, the new schedule will be “3 2 1 4 5”. Another limitation is that the department is allowed to issue only one request per week. Since they need the whole reorganization to finish in one year, the number of requests may not exceed 52. As you can see, their situation is not easy. Will you help? Input The input contains a sequence of several reorganizations, the last one followed by a line with zero. Each reorganization consists of three lines: the first line contains a positive integer N — the number of days in month that are considered, 1 ≤ N ≤ 30. The second line describes the old schedule and the third line the new schedule, each of them contains N meeting identifiers, separated with spaces. Some meetings may appear more than once. Output For each reorganization, output a single line containing at most 52 positive integer numbers D1, D2, ..., Dk separated by a space (1 ≤ Di ≤ N). The numbers must form a valid sequence of requests that will be issued to transform the old schedule to the new one. You are guaranteed that such a sequence will exist. If there are more valid sequences, feel free to output any of them. Sample Input 5 1 4 8 9 10 4 8 9 10 1 0 Sample Output 5 4
Lines _course
20170928Problem Description You play a game with your friend. He draws several lines on the paper with n×m square grids (see the left figure). After that, he writes down the number of lines passing through every integer coordinate in a matrix (see the right figure). ![](http://acm.hdu.edu.cn/data/images/C53510101.jpg) The number of lines passing though coordinate (i,j) is written in cell (i,j) in the right figure.(i,j both start from 0). You are given the matrix written by your friend. You need to figure out the possible minimal number of lines your friend drew on the paper. Input The first line of the input contains an integer T indicating the number of test cases( 0 < T <= 10). For each test case, the first line contains two integers n, m (1 ≤ n, m ≤ 50) representing the size of the grids on the paper. The following (n+1) × (m+1) numbers is what your friend writes. It is guaranteed that the number of lines your friend draws does not exceed 14. Each line passes through integer coordinates at least three times. Output For each test case, you need to output the minimal number of lines your friend drew on the paper in a single line. Sample Input 1 5 4 0 1 0 0 1 0 1 0 1 0 2 1 1 0 0 0 3 1 0 0 1 1 1 0 1 0 1 0 1 0 Sample Output 4
Random Walking _course
20171202Problem Description The Army of Cointossing Monkeys (ACM) is in the business of producing randomness. Good random numbers are important for many applications, such as cryptography, online gambling, randomized algorithms and panic attempts at solutions in the last few seconds of programming competitions. Recently, one of the best monkeys has had to retire. However, before he left, he invented a new, cheaper way to generate randomness compared to directly using the randomness generated by cointossing monkeys. The method starts by taking an undirected graph with 2n nodes labelled 0, 1, …, 2n  1. To generate k random nbit numbers, they will let the monkeys toss n coins to decide where on the graph to start. This node number is the first number output. The monkeys will then pick a random edge from this node, and jump to the node that this edge connects to. This new node will be the second random number output. They will then select a random edge from this node (possibly back to the node they arrived from in the last step), follow it and output the number of the node they landed on. This walk will continue until k numbers have been output. During experiments, the ACM has noticed that different graphs give different output distributions, some of them not very random. So, they have asked for your help testing the graphs to see if the randomness is of good enough quality to sell. They consider a graph good if, for each of the n bits in each of the k numbers generated, the probability that this bit is output as 1 is greater than 25% and smaller than 75%. Input The input will consist of several data sets. Each set will start with a line consisting of three numbers k, n, e separated by single spaces, where k is the number of nbit numbers to be generated and e is the number of edges in the graph (1 ≤ k ≤ 100, 1 ≤ n ≤ 10 and 1 ≤ e ≤ 2000). The next e lines will consist of two spaceseparated integers v1, v2 where 0 ≤ v1, v2 < 2n and v1 ≠ v2. Edges are undirected and each node is guaranteed to have at least one edge. There may be multiple edges between the same pair of nodes. The last test case will be followed by a line with k = n = e = 0, which should not be processed. Output For each input case, output a single line consisting of the word Yes if the graph is good, and No otherwise. Sample Input 10 2 3 0 3 1 3 2 3 5 2 4 0 1 0 3 1 2 2 3 0 0 0 Sample Output No Yes
Cells _course
20170324Scientists are conducting research on the behavior of a newly discovered Agamic Cellular Microbe. This special kind of microbe is capable of massively reproducing by itself in a short time. The lifetime of an ACM consists of three phases: 1. The infancy phase, which starts from its birth and lasts for approximately several seconds; 2. The multiplication phase, in which one ACM can procreate up to 100 offspring in only several milliseconds; 3. The mature phase, in which it remains inactive for the rest of its life. At the beginning of the experiment, a newborn, single cell of ACM, is put into a suitable circumstance for its production. This cell, numbered as 0, starts to multiply and its descendants are numbered, starting from 1, according to their positions in the family hierarchy. During the experiment special equipment is used to record the numbers of the offspring generated by each of the ACM's. The experiment is stopped after a certain time period. The family tree of ACM's in the first case of sample input Your task is to help the scientists to determine whether one ACM is an ancestor of another. Input Description Standard input will contain multiple test cases. The first line of the input is a single integer T (1 <= T <= 10) which is the number of test cases. T test cases follow, each preceded by a single blank line. Each test case starts with a single integer N (1 <= N <= 300,000) which is the number of ACM's that have their descendants recorded. The following N integers (not necessarily on a same line), Ci (0 <= i < N, 0 <= Ci <= 100), give the number of offspring of the ith ACM. The next line contains an integer M (1 <= M <= 1,000,000) which is the number of queries. M lines follow, each contains two integers a and b, querying whether the ath ACM is an ancestor of the bth ACM. The total number of ACM's may be greater than N, but would never exceed 20,000,000. Output Description Results should be directed to standard output. Start each case with "Case #:" on a single line, where # is the case number starting from 1. Two consecutive cases should be separated by a single blank line. No blank line should be produced after the last test case. For each query, print either "Yes" or "No" on a single line, which is the answer to the query. Sample Input 2 6 3 2 1 1 0 2 5 0 1 2 4 3 5 1 8 6 9 5 2 0 3 0 1 4 2 6 1 6 2 3 3 5 Sample Output Case 1: Yes No No Yes No Case 2: Yes No Yes No
学透JavaScript
20200314JavaScript是前端程序员的必修课，也是目前流行的各前端框架的基础知识。本课程将全面剖析JavaScript的运行机制，掌握最核心的语法和编程思维、使用丰富的实例来帮助学员的理解JavaScript、jQurey。介绍笔试，面试环节中关于JS的常见问题，为将来的工作打下坚实基础。主讲老师有着丰富的前端开发经验和教学经验，在教学过程中不仅注重前端实践的动手能力，同时也注重培养同学们的编程思维模式和手写代码的核心能力。全课程不复制粘贴，除了特殊情况外，所有代码全部直播手写（直接敲代码），增加同学们的印象，相信通过这样的能力训练，同学们的动手能力会有飞越的提升。
高性能MySQL实战课
20200521限时福利1：原价 129 元，最后2天仅需 69 元！后天涨价至98元 限时福利2：购课进答疑群专享柳峰（刘运强）老师答疑服务 限时福利3：购课添加助教领取价值 800 元的编程大礼包 为什么需要掌握高性能的MySQL实战？ 由于互联网产品用户量大、高并发请求场景多，因此对MySQL的性能、可用性、扩展性都提出了很高的要求。使用MySQL解决大量数据以及高并发请求已经是程序员的必备技能，也是衡量一个程序员能力和薪资的标准之一。 为了让大家快速系统了解高性能MySQL核心知识全貌，我为你总结了「高性能 MySQL 知识框架图」,帮你梳理学习重点，建议收藏！ 【课程设计】 课程分为四大篇章，将为你建立完整的 MySQL 知识体系，同时将重点讲解 MySQL 底层运行原理、数据库的性能调优、高并发、海量业务处理、面试解析等。 一、性能优化篇： 主要包括经典 MySQL 问题剖析、索引底层原理和事务与锁机制。通过深入理解 MySQL 的索引结构 B+Tree ，学员能够从根本上弄懂为什么有些 SQL 走索引、有些不走索引，从而彻底掌握索引的使用和优化技巧，能够避开很多实战中遇到的“坑”。 二、MySQL 8.0新特性篇： 主要包括窗口函数和通用表表达式。企业中的许多报表统计需求，如果不采用窗口函数，用普通的 SQL 语句是很难实现的。 三、高性能架构篇： 主要包括主从复制和读写分离。在企业的生产环境中，很少采用单台MySQL节点的情况，因为一旦单个节点发生故障，整个系统都不可用，后果往往不堪设想，因此掌握高可用架构的实现是非常有必要的。 四、面试篇： 程序员获得工作的第一步，就是高效的准备面试，面试篇主要从知识点回顾总结的角度出发，结合程序员面试高频MySQL问题精讲精练，帮助程序员吊打面试官，获得心仪的工作机会。
 3.64MB
Xshell6完美破解版，亲测可用
20181226Xshell6破解版，亲测可用，分享给大家。直接解压即可使用
 43.19MB
智鼎(附答案).zip
20200422并不是完整题库，但是有智鼎在线2019年9、10、11三个月的试题，有十七套以上题目，普通的网申行测题足以对付，可以在做题时自己总结一些规律，都不是很难
 43KB
炉温系统的PID控制器设计——MATLAB程序
20180517本文主要研究的课题是：炉温系统的PID控制器设计研究 ，并且在MATLAB的大环境下进行模拟仿真。 (1)第一章 介绍课题的研究背景、意义以及发展现状。 (2)第二章 建立炉温系统数学模型 (3)第三
Python入门视频精讲
20180904Python入门视频培训课程以通俗易懂的方式讲解Python核心技术，Python基础，Python入门。适合初学者的教程，让你少走弯路！ 课程内容包括：1.Python简介和安装 、2.第一个Python程序、PyCharm的使用 、3.Python基础、4.函数、5.高级特性、6.面向对象、7.模块、8.异常处理和IO操作、9.访问数据库MySQL。教学全程采用笔记+代码案例的形式讲解，通俗易懂！！！
 121KB
移动认证互联网内容管理题库L2
20190426中国移动认证互联网内容管理学习题库L2
21天通关Python（仅视频课）
20190521本页面购买不发书！！！仅为视频课购买！！！ 请务必到https://edu.csdn.net/bundled/detail/49下单购买课+书。 本页面，仅为观看视频页面，如需一并购买图书，请务必到https://edu.csdn.net/bundled/detail/49下单购买课程+图书！！！ 疯狂Python精讲课程覆盖《疯狂Python讲义》全书的主体内容。 内容包括Python基本数据类型、Python列表、元组和字典、流程控制、函数式编程、面向对象编程、文件读写、异常控制、数据库编程、并发编程与网络编程、数据可视化分析、Python爬虫等。 全套课程从Python基础开始介绍，逐步步入当前就业热点。将会带着大家从Python基础语法开始学习，为每个知识点都提供对应的代码实操、代码练习，逐步过渡到文件IO、数据库编程、并发编程、网络编程、数据分 析和网络爬虫等内容，本课程会从小案例起，至爬虫、数据分析案例终、以Python知识体系作为内在逻辑，以Python案例作为学习方式，最终达到“知行合一”。
手把手搭建Java酒店管理系统【附源码】（毕设）
20200316本课程演示的是一套基于SSM框架实现的酒店管理系统，主要针对计算机相关专业的正在做毕设的学生与需要项目实战练习的Java学习者。 1. 包含：项目源码、项目文档、数据库脚本、软件工具等所有资料 2. 手把手的带你从零开始部署运行本套系统 3. 该项目附带的源码资料可作为毕设使用 4. 提供技术答疑和远程协助指导 技术实现： 1. 后台框架：Spring、SpringMVC、MyBatis 2. UI界面：BootStrap、JSP、jQuery 3. 数据库：MySQL 项目截图： 1）系统登陆界面 2）客房预订 3）住宿登记 4）旅客管理 更多Java毕设项目请关注【毕设系列课程】https://edu.csdn.net/lecturer/2104
 学院 JavaWeb家具家居购物商城毕业设计 大学生毕业设计教学视频
 博客 Anaconda安装Python第三方库Pytorch0.4
 博客 Data Ability基本概念、访问及创建
 博客 tabelu 甘特图
 学院 轻松学习Python 69个内置函数(持续更新中)
 学院 python基础快速处理Excel
 学院 FFmpeg4.3黄金系列课程：c++版
 学院 基于RK3399和OpenCV实现实时视频增强
 学院 项目管理工具箱
 博客 ＜1＞使用IDEA初始化一个springboot
 下载 GIS在深圳市三防指挥信息系统中的应用
 学院 人工智能特训营第32期
 下载 无线基站优化中PA的性能
 学院 FFmpeg4.3开发系列之七：WEB音视频转码器Java版
 博客 蛋糕店 题解
 博客 OCR研究与发展的历史回顾
 下载 控制驱动VR的方法
 下载 运动控制技术在柔版印刷设备中的应用
 学院 项目构建工具Maven
 博客 海口(本地)
 学院 JavaWeb珠宝首饰购物商城毕业设计 大学生毕业设计教学视频
 学院 SkyEye智慧眼系统搭建 一
 博客 Java静态static关键字用法。Arrays工具类的用法
 学院 Java微信小程序母婴用品商城 大学生毕业设计教学视频
 学院 PowerDesigner数据库设计与建模
 博客 TCP/IP协议的SYN攻击
 博客 小技巧  枚举整数的每一位数字
 学院 JavaWeb化妆品购物商城毕业设计 大学生毕业设计教学视频
 下载 JQuery对表单元素的基本操作使用总结
 博客 Gin增删改查demo