 取模运算的题目，实在是不会做，在这里请高手分析下C语言

Problem Description
THE END IS COMINGGGGGG!Mike has got stuck on a mystery machine. If he cannot solve this problem, he will go to his doom.
This machine is consist of n cells, and a screen. The ith cell contains a number ai(1≤i≤n). The screen also contains a number s, which is initially 0.
There is a button on each cell. When the ith is pushed, Mike observes that, the number on the screen will be changed to s+ai, where s is the original number. and the number on the ith cell will be changed to a2i.
Mike observes that the number is stored in radix p, where p=9223372034707292160. In other words , the operation is under modulo p.
And now, Mike has got a list of operations. One operation is to push buttons between from lth to rth (both included), and record the number on the screen. He is tired of this stupid work, so he asks for your help. Can you tell him, what are the numbers recorded.
Input
The first line contains an integer T(T≤5), denoting the number of test cases.For each test case, the first line contains two integers n,m(1≤n,m≤105).
The next line contains n integers ai(0≤ai<p), which means the initial values of the n cells.
The next m lines describe operations. In each line, there are two integers l,r(1≤l≤r≤n), representing the operation.
Output
For each test case, output ''Case #t:'', to represent this is the tth case. And then output the answer for each query operation, one answer in a line.For more details you can take a look at the example.
Sample Input
2
4 4
2 3 4 5
1 2
2 3
3 4
1 4
1 3
2
1 1
1 1
1 1Sample Output
Case #1:
5
18
39
405
Case #2:
2
6
22
he first line contains an integer T(T≤5), denoting the number of test cases.
 贵阳老马马善福专业维修游泳池堵漏防水工程 请管理员注意封杀这个胡乱灌水的垃圾用户。
 一年多之前 回复
Tour Guide 怎么用C语言实现的_course
20190909Problem Description You are working as a guide on a tour bus for retired people, and today you have taken your regular Nordic seniors to The Gate of Heavenly Peace. You let them have a lunch break where they could do whatever they like. Now you have to get them back to the bus, but they are all walking in random directions. You try to intersect them, and send them straight back to the bus. Minimize the time before the last person is in the bus. You will always be able to run faster than any of the tour guests, and they walk with constant speed, no matter what you tell them. The seniors walk in straight lines, and the only way of changing their direction is to give them promises of camphor candy. A senior will neither stop at nor enter the bus before given such a promise. Input A number of test cases consisting of: A line with an integer 1 ≤ n ≤ 8, the number of people on the tour. A line with an floating point number 1 < v ≤ 100, your maximum speed (you start in the bus at the origin). Then follow n lines, each containing four floating point numbers xi yi vi ai, the starting coordinates (106 ≤ xi, yi ≤ 106), speed (1 ≤ vi < 100) and direction (0 ≤ ai < 2π) of each of the tour guests. The input is terminated by a case with n = 0, which should not be processed. All floating point numbers in the input will be written in standard decimal notation, and have no more than 10 digits. Output For each test case, print a line with the time it takes before everybody is back in the bus (the origin). Round the answer to the nearest integer. The answer will never be larger than 106. Sample Input 1 50.0 125.0 175.0 25.0 1.96 3 100.0 40.0 25.0 20.0 5.95 185.0 195.0 6.0 2.35 30.0 80.0 23.0 2.76 0 Sample Output 20 51
计算乘坐汽车所需要的时间的问题，怎么用C语言的程序的代码设计的编写的思想的方法来实现的呢_course
20190625Problem Description You are working as a guide on a tour bus for retired people, and today you have taken your regular Nordic seniors to The Gate of Heavenly Peace. You let them have a lunch break where they could do whatever they like. Now you have to get them back to the bus, but they are all walking in random directions. You try to intersect them, and send them straight back to the bus. Minimize the time before the last person is in the bus. You will always be able to run faster than any of the tour guests, and they walk with constant speed, no matter what you tell them. The seniors walk in straight lines, and the only way of changing their direction is to give them promises of camphor candy. A senior will neither stop at nor enter the bus before given such a promise. Input A number of test cases consisting of: A line with an integer 1 ≤ n ≤ 8, the number of people on the tour. A line with an floating point number 1 < v ≤ 100, your maximum speed (you start in the bus at the origin). Then follow n lines, each containing four floating point numbers xi yi vi ai, the starting coordinates (106 ≤ xi, yi ≤ 106), speed (1 ≤ vi < 100) and direction (0 ≤ ai < 2π) of each of the tour guests. The input is terminated by a case with n = 0, which should not be processed. All floating point numbers in the input will be written in standard decimal notation, and have no more than 10 digits. Output For each test case, print a line with the time it takes before everybody is back in the bus (the origin). Round the answer to the nearest integer. The answer will never be larger than 106. Sample Input 1 50.0 125.0 175.0 25.0 1.96 3 100.0 40.0 25.0 20.0 5.95 185.0 195.0 6.0 2.35 30.0 80.0 23.0 2.76 0 Sample Output 20 51
路径距离计算保留2个小数的做法，运用C语言的表达方式_course
20190318Problem Description You are working as a guide on a tour bus for retired people, and today you have taken your regular Nordic seniors to The Gate of Heavenly Peace. You let them have a lunch break where they could do whatever they like. Now you have to get them back to the bus, but they are all walking in random directions. You try to intersect them, and send them straight back to the bus. Minimize the time before the last person is in the bus. You will always be able to run faster than any of the tour guests, and they walk with constant speed, no matter what you tell them. The seniors walk in straight lines, and the only way of changing their direction is to give them promises of camphor candy. A senior will neither stop at nor enter the bus before given such a promise. Input A number of test cases consisting of: A line with an integer 1 ≤ n ≤ 8, the number of people on the tour. A line with an floating point number 1 < v ≤ 100, your maximum speed (you start in the bus at the origin). Then follow n lines, each containing four floating point numbers xi yi vi ai, the starting coordinates (106 ≤ xi, yi ≤ 106), speed (1 ≤ vi < 100) and direction (0 ≤ ai < 2π) of each of the tour guests. The input is terminated by a case with n = 0, which should not be processed. All floating point numbers in the input will be written in standard decimal notation, and have no more than 10 digits. Output For each test case, print a line with the time it takes before everybody is back in the bus (the origin). Round the answer to the nearest integer. The answer will never be larger than 106. Sample Input 1 50.0 125.0 175.0 25.0 1.96 3 100.0 40.0 25.0 20.0 5.95 185.0 195.0 6.0 2.35 30.0 80.0 23.0 2.76 0 Sample Output 20 51
Cow Hurdles 用C语言实现_course
20190922Description Farmer John wants the cows to prepare for the county jumping competition, so Bessie and the gang are practicing jumping over hurdles. They are getting tired, though, so they want to be able to use as little energy as possible to jump over the hurdles. Obviously, it is not very difficult for a cow to jump over several very short hurdles, but one tall hurdle can be very stressful. Thus, the cows are only concerned about the height of the tallest hurdle they have to jump over. The cows' practice room has N (1 ≤ N ≤ 300) stations, conveniently labeled 1..N. A set of M (1 ≤ M ≤ 25,000) oneway paths connects pairs of stations; the paths are also conveniently labeled 1..M. Path i travels from station Si to station Ei and contains exactly one hurdle of height Hi (1 ≤ Hi ≤ 1,000,000). Cows must jump hurdles in any path they traverse. The cows have T (1 ≤ T ≤ 40,000) tasks to complete. Task i comprises two distinct numbers, Ai and Bi (1 ≤ Ai ≤ N; 1 ≤ Bi ≤ N), which connote that a cow has to travel from station Ai to station Bi (by traversing over one or more paths over some route). The cows want to take a path the minimizes the height of the tallest hurdle they jump over when traveling from Ai to Bi . Your job is to write a program that determines the path whose tallest hurdle is smallest and report that height. Input * Line 1: Three spaceseparated integers: N, M, and T * Lines 2..M+1: Line i+1 contains three spaceseparated integers: Si , Ei , and Hi * Lines M+2..M+T+1: Line i+M+1 contains two spaceseparated integers that describe task i: Ai and Bi Output * Lines 1..T: Line i contains the result for task i and tells the smallest possible maximum height necessary to travel between the stations. Output 1 if it is impossible to travel between the two stations. Sample Input 5 6 3 1 2 12 3 2 8 1 3 5 2 5 3 3 4 4 2 4 8 3 4 1 2 5 1 Sample Output 4 8 1
Help Bob，用C语言_course
20190814Problem Description Bob loves Pizza but is always out of money. One day he reads in the newspapers that his favorite pizza restaurant, Alfredo's Pizza Restaurant, is running a competition: they will donate a big pizza to the first person who will tell them the lowest price per area that can be achieved by buying any of the pizzas at most once. "That task is easy!", thinks Bob, "For each pizza I just calculate the average price and the lowest quotient will be the answer.". Unfortunately the problem is a bit more complicated: with some pizzas Alberto gives out discount coupons for getting another pizza cheaper and even worse, those coupons can be combined. The pizzas have to be bought one after the other, and it is not possible to use a coupon to get a discount retrospectively for a pizza which has already been bought. Can you help Bob to become the first to solve this task and to get a pizza for free? Input The input file contains several test cases. Each test case starts with a number m, the number of pizzas Alfredo offers. Input is terminated by m=0. Otherwise, 1 ≤ m ≤ 15. Then follow m lines describing the pizzas. Each of those following lines describes pizza i (1 ≤ i ≤ m) and starts with 3 integer numbers pi, ai and ni specifying the price of the pizza, its area and the number of discount coupons you get when buying it, 1 ≤ pi ≤ 10000, 1 ≤ ai ≤ 10000 and 0 ≤ ni < m. Then follow ni pairs of integer numbers xi,j and yi,j specifying the index xi,j (1 ≤ xi,j ≤ m, xi,j ≠ i) of the pizza you get a discount coupon for and the discount in percentage terms yi,j (1 ≤ yi,j ≤ 50) you get when buying pizza xi,j. You may assume that for each i the values xi,j are pairwise distinct. Output For each test case print one line containing the lowest price per area that can be achieved by buying any of the pizzas at most once. Round this number to 4 places after the decimal point. Note that you can combine an arbitrary number of discount coupons: for a pizza with price 10 and two rabatt coupons for that pizza with a 50 and a 20 on it, you would only have to pay 10 * 0.8 * 0.5 = 4 monetary units. Sample Input 1 80 30 0 2 200 100 1 2 50 200 100 0 5 100 100 2 3 50 2 50 100 100 1 4 50 100 100 1 2 40 600 600 1 5 10 1000 10 1 1 50 0 Sample Output 2.6667 1.5000 0.5333
用竖式计算的一个二进制运算的问题，怎么才能利用C语言的方式的程序来设计_course
20190403Problem Description QQ and OO always play the game of A + B. QQ gives tow decimal number A and B, and OO answers the sum at once. But to do the same things too often is boring. So, today they are fed up with the easy game, and they come up with new rules of the game. Rule1: When add A and B we use the binary system string of A and B. Rule2: We can overlap the same suffix of A and prefix of B. Rule3: If the binary system string of B is a substring of A we can use A to overlap B. To make the problem more interesting, QQ gives n numbers, OO should use every one of them and every one once, then give the smallest of the sum. Now OO have no time to do it and need your help. You're a talented programmer you can do it. Input There are several tests, every test begin with n followed with n (0 < n < 16) lines, each line is a decimal number ai(0 < ai < 2^64) as described above. Process until EOF. Output For each test you should print the smallest answer per line, maybe the answer is large you should mod 1000000009. Sample Input 2 5 3 3 245 351 107 Sample Output 11 3935
一行中打印指定子序列的不同值的总和，运用C语言的程序的设计编写代码的方式怎么来做_course
20190612Problem Description After inventing Turing Tree, 3xian always felt boring when solving problems about intervals, because Turing Tree could easily have the solution. As well, wily 3xian made lots of new problems about intervals. So, today, this sick thing happens again... Now given a sequence of N numbers A1, A2, ..., AN and a number of Queries(i, j) (1≤i≤j≤N). For each Query(i, j), you are to caculate the sum of distinct values in the subsequence Ai, Ai+1, ..., Aj. Input The first line is an integer T (1 ≤ T ≤ 10), indecating the number of testcases below. For each case, the input format will be like this: * Line 1: N (1 ≤ N ≤ 30,000). * Line 2: N integers A1, A2, ..., AN (0 ≤ Ai ≤ 1,000,000,000). * Line 3: Q (1 ≤ Q ≤ 100,000), the number of Queries. * Next Q lines: each line contains 2 integers i, j representing a Query (1 ≤ i ≤ j ≤ N). Output For each Query, print the sum of distinct values of the specified subsequence in one line. Sample Input 2 3 1 1 4 2 1 2 2 3 5 1 1 2 1 3 3 1 5 2 4 3 5 Sample Output 1 5 6 3 6
The KLeague 用C语言_course
20191110Description Supporters for the professional soccer clubs participating in the KLeague, formerly the Korea Professional Soccer League, hold orderly and organized cheering, as did the Red Devils, the official supporters for the Korean national soccer team during the 2002 KoreaJapan World Cup. After many games of this season have been played, the supporters may wonder whether the team S they are backing can still win the championship. In other words, can winners be assigned for the remaining games so that no team ends with more victories than S?(Two or more teams can win the championship jointly.) You are given the current number of wins and defeats, wi and di, for every team i, 1<=i<=n, and the remaining number, ai,j, of games to be played between every pair of teams i and j, 1<=i,j<=n, where n is the number of teams. The teams are numbered 1,2,...,n. You are to find all teams that have a possibility of winning the championship. Every team has to play the same number games during the season. For simplicity, we assume that there are no draws, that is, every game has a winner and a loser. Input The input consists of T test cases. The number of test cases (T) is given in the first line of the input file. Each test case consists of three lines: the first line has an integer n, 1<=n<=25, that represents the number of teams in the test case; the second line contains 2n nonnegative integers w1,d1,w2,d2... each at most 100, where wi and di are the current numbers of wins and defeats for team i, respectively; the third line contains n2 nonnegative integers a1,1,a1,2,... each at most 10, where ai,j is the remaining number of games to be played between teams i and j . For all i and j, ai,j=aj,i. If i=j, then ai,j=0. The integers given in a line are delimited by one or more spaces. Output Print exactly one line for each test case. The line should contain all teams that have a possibility of winning the championship, in an increasing order of team numbers. Sample Input 3 3 2 0 1 1 0 2 0 2 2 2 0 2 2 2 0 3 4 0 2 2 0 4 0 1 1 1 0 1 1 1 0 4 0 3 3 1 1 3 3 0 0 0 0 2 0 0 1 0 0 1 0 0 2 0 0 0 Sample Output 1 2 3 1 2 2 4
用C语言实现农场游戏的问题，解法的实现_course
20190731Problem Description “Farm Game” is one of the most popular games in online community. In the community each player has a virtual farm. The farmer can decide to plant some kinds of crops like wheat or paddy, and buy the corresponding crop seeds. After they grow up, The farmer can harvest the crops and sell them to gain virtual money. The farmer can plant advanced crops like soybean, watermelon or pumpkin, as well as fruits like lychee or mango. Feeding animals is also allowed. The farmer can buy chicken, rabbits or cows and feeds them by specific crops or fruits. For example, chicken eat wheat. When the animals grow up, they can also “output” some products. The farmer can collect eggs and milk from hens and cows. They may be sold in a better price than the original crops. When the farmer gets richer, manufacturing industry can be set up by starting up some machines. For example, Cheese Machine can transfer milk to cheese to get better profits and Textile Machine can spin cony hair to make sweaters. At this time, a production chain appeared in the farm. Selling the products can get profits. Different products may have different price. After gained some products, the farmer can decide whether to sell them or use them as animal food or machine material to get advanced products with higher price. Jack is taking part in this online community game and he wants to get as higher profits as possible. His farm has the extremely high level so that he could feed various animals and build several manufacturing lines to convert some products to other products. In short, some kinds of products can be transformed into other kinds of products. For example, 1 pound of milk can be transformed into 0.5 pound of cheese, and 1 pound of crops can be transformed into 0.1 pound of eggs, etc. Every kind of product has a price. Now Jack tell you the amount of every kind of product he has, and the transform relationship among all kinds of products, please help Jack to figure out how much money he can make at most when he sell out all his products. Please note that there is a transforming rule: if product A can be transformed into product B directly or indirectly, then product B can never be transformed into product A, no matter directly or indirectly. Input The input contains several test cases. The first line of each test case contains an integers N (N<=10000) representing that there are N kinds of products in Jack’s farm. The product categories are numbered for 1 to N. In the following N lines, the ith line contains two real numbers p and w, meaning that the price for the ith kind of product is p per pound and Jack has w pounds of the ith kind of product. Then there is a line containing an integer M (M<=25000) meaning that the following M lines describes the transform relationship among all kinds of products. Each one of those M lines is in the format below: K a0, b1, a1, b2, a2, …, bk1, ak1 K is an integer, and 2×K1 numbers follows K. ai is an integer representing product category number. bi is a real number meaning that 1 pound of product ai1 can be transformed into bi pound of product ai. The total sum of K in all M lines is less than 50000. The input file is ended by a single line containing an integer 0. Output For each test case, print a line with a real number representing the maximum amount of money that Jack can get. The answer should be rounded to 2 digits after decimal point. We guarantee that the answer is less than 10^10. Sample Input 2 2.5 10 5 0 1 2 1 0.5 2 2 2.5 10 5 0 1 2 1 0.8 2 0 Sample Output 25.00 40.00
二叉树的链表存储，线索二叉树的算法问题，怎么使用C语言实现节点遍历_course
20190205Problem Description Teacher Mai has m+1 trees, T0,T1,⋯,Tm. T0 consists one vertex numbered 0. He generated the Ti in this way. Get a copy of Tai and Tbi. Add an edge with length li between vertex numbered ci in T′ai and di in T′bi. Relabel the vertices in the new tree. Let k be the number of vertices in T′ai. He keeps labels of vertices in T′ai the same, and adds k to labels of vertices in T′bi. If there is a tree T with n vertices v0,v1,v2,⋯,vn−1, F(T)=∑n−1i=0∑n−1j=i+1d(vi,vj)(d(vi,vj) means the distance between the vi and vj). For every i(1≤i≤m), he wants to know F(Ti). Input There are multiple test cases(about 100). For each test case, the first line contains one number m(1≤m≤60), the following are m lines. The ith lines contains five numbers ai,bi,ci,di,li(0≤ai,bi<i,0≤li≤109). It's guarenteed that there exists a vertex numbered ci in Tai and there exists a vertex numbered di in Tbi. Output For each test case, print F(Ti) modulo 109+7 in the ith line. Sample Input 3 0 0 0 0 2 1 1 0 0 4 2 2 1 0 3 Sample Output 2 28 216
整数线性表排序+反转的一个算法，采用C语言如何进行求解答？_course
20190122Problem Description Professor Permula gave a number of permutations of the n integers 1, 2, ..., n to her students. For each integer i (1 <= i <= n), she asks the students to write down the number of integers greater than i that appears before i in the given permutation. This number is denoted ai. For example, if n = 8 and the permutation is 2,7,3,5,4,1,8,6, then a1 = 5 because there are 5 numbers (2, 7, 3, 5, 4) greater than 1 appearing before it. Similarly, a4 = 2 because there are 2 numbers (7, 5) greater than 4 appearing before it. John, one of the students in the class, is studying for the final exams now. He found out that he has lost the assignment questions. He only has the answers (the ai's) but not the original permutation. Can you help him determine the original permutation, so he can review how to obtain the answers? Input The input consists of a number of test cases. Each test case starts with a line containing the integer n (n <= 500). The next n lines give the values of a1, ..., an. The input ends with n = 0. Output For each test case, print a line specifying the original permutation. Adjacent elements of a permutation should be separated by a comma. Note that some cases may require you to print lines containing more than 80 characters. Sample Input 8 5 0 1 2 1 2 0 0 10 9 8 7 6 5 4 3 2 1 0 0 Sample Output 2,7,3,5,4,1,8,6 10,9,8,7,6,5,4,3,2,1
最长有序的子序列配对问题，怎么运用C语言的程序的代码编写的过程去实现的呢？_course
20190601Problem Description A numeric sequence of ai is ordered if a1<a2<…<aN. Let the subsequence of the given numeric sequence (a1,a2,…,aN) be any sequence (ai1,ai2,…,aiK), where 1≤i1<i2<…<iK≤N. For example, sequence (1, 7, 3, 5, 9, 4, 8) has ordered subsequences, eg. (1, 7), (3, 4, 8) and many others. S[ i , j ] indicates ( ai,ai+1,ai+2,…,aj) . Your program, when given the numeric sequence (a1,a2,…,aN), must find the number of pair ( i, j) which makes the length of the longest ordered subsequence of S[ i , j ] equals to the length of the longest ordered subsequence of (a1,a2,…,aN). Input Multi test cases (about 100), every case occupies two lines, the first line contain n, then second line contain n numbers a1,a2,…,aN separated by exact one space. Process to the end of file. [Technical Specification] 1≤n≤100000 0≤ai≤1000000000 Output For each case，.output the answer in a single line. Sample Input 3 1 2 3 2 2 1 Sample Output 1 3
计算距离的浮点的表示的计算问题，怎么用C语言的程序的设计的代码来实现的_course
20190630Problem Description You are working as a guide on a tour bus for retired people, and today you have taken your regular Nordic seniors to The Gate of Heavenly Peace. You let them have a lunch break where they could do whatever they like. Now you have to get them back to the bus, but they are all walking in random directions. You try to intersect them, and send them straight back to the bus. Minimize the time before the last person is in the bus. You will always be able to run faster than any of the tour guests, and they walk with constant speed, no matter what you tell them. The seniors walk in straight lines, and the only way of changing their direction is to give them promises of camphor candy. A senior will neither stop at nor enter the bus before given such a promise. Input A number of test cases consisting of: A line with an integer 1 ≤ n ≤ 8, the number of people on the tour. A line with an floating point number 1 < v ≤ 100, your maximum speed (you start in the bus at the origin). Then follow n lines, each containing four floating point numbers xi yi vi ai, the starting coordinates (106 ≤ xi, yi ≤ 106), speed (1 ≤ vi < 100) and direction (0 ≤ ai < 2π) of each of the tour guests. The input is terminated by a case with n = 0, which should not be processed. All floating point numbers in the input will be written in standard decimal notation, and have no more than 10 digits. Output For each test case, print a line with the time it takes before everybody is back in the bus (the origin). Round the answer to the nearest integer. The answer will never be larger than 106. Sample Input 1 50.0 125.0 175.0 25.0 1.96 3 100.0 40.0 25.0 20.0 5.95 185.0 195.0 6.0 2.35 30.0 80.0 23.0 2.76 0 Sample Output 20 51
旅行商的一个最小移动的问题，怎么利用C语言的程序代码的编写的实现的步骤去解决呢？_course
20190520Problem Description You are working as a guide on a tour bus for retired people, and today you have taken your regular Nordic seniors to The Gate of Heavenly Peace. You let them have a lunch break where they could do whatever they like. Now you have to get them back to the bus, but they are all walking in random directions. You try to intersect them, and send them straight back to the bus. Minimize the time before the last person is in the bus. You will always be able to run faster than any of the tour guests, and they walk with constant speed, no matter what you tell them. The seniors walk in straight lines, and the only way of changing their direction is to give them promises of camphor candy. A senior will neither stop at nor enter the bus before given such a promise. Input A number of test cases consisting of: A line with an integer 1 ≤ n ≤ 8, the number of people on the tour. A line with an floating point number 1 < v ≤ 100, your maximum speed (you start in the bus at the origin). Then follow n lines, each containing four floating point numbers xi yi vi ai, the starting coordinates (106 ≤ xi, yi ≤ 106), speed (1 ≤ vi < 100) and direction (0 ≤ ai < 2π) of each of the tour guests. The input is terminated by a case with n = 0, which should not be processed. All floating point numbers in the input will be written in standard decimal notation, and have no more than 10 digits. Output For each test case, print a line with the time it takes before everybody is back in the bus (the origin). Round the answer to the nearest integer. The answer will never be larger than 106. Sample Input 1 50.0 125.0 175.0 25.0 1.96 3 100.0 40.0 25.0 20.0 5.95 185.0 195.0 6.0 2.35 30.0 80.0 23.0 2.76 0 Sample Output 20 51
C语言的程序，解决Box Betting问题_course
20190819Problem Description Theres a new delivery boy at your company, supposed to drive around delivering a specific number of items to difierent locations. He needs to deliver at least X of an item, while the truck can at most take Y of the item. If there are more, the truck is will to break down due to the weight. If there are less, that means he hasn't fulfilled the assignment. At the loading station, there's a row of boxes he can bring along. Each box contains a specified number of items. This driver isn't the sharpest snail on the rock, however. Since he's also too shy to ask for help, he's decided to just choose one entirely random starting point in the row of boxes. Then he chooses a random end point among the boxes from the starting point to the end, inclusive. All the boxes between those points (inclusive) are loaded onto the truck. You and the other employees have started betting on whether or not the truck breaks down, he brings to few items along or if he should happen to be lucky enough to fulfil the assignment without any problems. This gets you wondering. What is the actual probability for each of these scenarios to occur? Assume for the sake of this problem that the driver will always be able to fit all the boxes into the truck (after all, he had to have SOME skill, seeing as he was hired). Input The input will start with a line containing a single number T, the number of test cases. Each test case consists of three lines. The first one contains a single number N, the number of boxes. The second line contains a sequence of N characters (AZ), B1B2...BN (no whitespace), representing the amount of items in each of the boxes in the same order as they're located on the loading dock. An A represents an empty box, B a box with 1 item, and so on until Z, which represents a box with 25 items in it. The third line contains the two numbers L and U. L is the number of items the driver is supposed to deliver, while U is the maximum number of items the truck can take before it'll break down. Output For each test case, output three floating point numbers on a single line. The first number gives the probability that the driver succeeds, the second one that that he brings along too few items, and the third one that the truck breaks down. Notes and Constraints 0 < T <= 100 1 < B <= 200000 'A' <= Ai <= 'Z' 0 <= L <= U <= 50000 Both the starting and ending points of the segment are chosen with a uniform probability distribution. Any answer within 10^6 of the correct one will be accepted. Sample Input 2 4 KCHA 2 9 3 BCD 4 5 Sample Output 0.5 0.25 0.25 0.16666667 0.72222222 0.11111111
数列整数相邻判断的问题，如何利用C语言的功能去实现的_course
20190303Problem Description You are working as a guide on a tour bus for retired people, and today you have taken your regular Nordic seniors to The Gate of Heavenly Peace. You let them have a lunch break where they could do whatever they like. Now you have to get them back to the bus, but they are all walking in random directions. You try to intersect them, and send them straight back to the bus. Minimize the time before the last person is in the bus. You will always be able to run faster than any of the tour guests, and they walk with constant speed, no matter what you tell them. The seniors walk in straight lines, and the only way of changing their direction is to give them promises of camphor candy. A senior will neither stop at nor enter the bus before given such a promise. Input A number of test cases consisting of: A line with an integer 1 ≤ n ≤ 8, the number of people on the tour. A line with an floating point number 1 < v ≤ 100, your maximum speed (you start in the bus at the origin). Then follow n lines, each containing four floating point numbers xi yi vi ai, the starting coordinates (106 ≤ xi, yi ≤ 106), speed (1 ≤ vi < 100) and direction (0 ≤ ai < 2π) of each of the tour guests. The input is terminated by a case with n = 0, which should not be processed. All floating point numbers in the input will be written in standard decimal notation, and have no more than 10 digits. Output For each test case, print a line with the time it takes before everybody is back in the bus (the origin). Round the answer to the nearest integer. The answer will never be larger than 106. Sample Input 1 50.0 125.0 175.0 25.0 1.96 3 100.0 40.0 25.0 20.0 5.95 185.0 195.0 6.0 2.35 30.0 80.0 23.0 2.76 0 Sample Output 20 51
序列的转置的算法的问题的计算的方式，使用C语言的编程算法技术_course
20190320Problem Description Let { A1,A2,...,An } be a permutation of the set{ 1,2,..., n}. If i < j and Ai > Aj then the pair (Ai,Aj) is called an "inversion" of the permutation. For example, the permutation {3, 1, 4, 2} has three inversions: (3,1), (3,2) and (4,2). The inversion table B1,B2,...,Bn of the permutation { A1,A2,...,An } is obtained by letting Bj be the number of elements to the left of j that are greater than j. (In other words, Bj is the number of inversions whose second component is j.) For example, the permutation: { 5,9,1,8,2,6,4,7,3 } has the inversion table 2 3 6 4 0 2 2 1 0 since there are 2 numbers, 5 and 9, to the left of 1; 3 numbers, 5, 9 and 8, to the left of 2; etc. Perhaps the most important fact about inversions is Marshall Hall's observation that an inversion table uniquely determines the corresponding permutation. So your task is to convert a permutation to its inversion table, or vise versa, to convert from an inversion table to the corresponding permutation. Input The input consists of several test cases. Each test case contains two lines. The first line contains a single integer N ( 1 <= N <= 50) which indicates the number of elements in the permutation/invertion table. The second line begins with a single charactor either 'P', meaning that the next N integers form a permutation, or 'I', meaning that the next N integers form an inversion table. Output For each case of the input output a line of intergers, seperated by a single space (no space at the end of the line). If the input is a permutation, your output will be the corresponding inversion table; if the input is an inversion table, your output will be the corresponding permutation. Sample Input 9 P 5 9 1 8 2 6 4 7 3 9 I 2 3 6 4 0 2 2 1 0 0 Sample Output 2 3 6 4 0 2 2 1 0 5 9 1 8 2 6 4 7 3
数列的翻转表的一个算法的问题的求解，用C语言的程序编写怎么实现的啊_course
20190326Problem Description Let { A1,A2,...,An } be a permutation of the set{ 1,2,..., n}. If i < j and Ai > Aj then the pair (Ai,Aj) is called an "inversion" of the permutation. For example, the permutation {3, 1, 4, 2} has three inversions: (3,1), (3,2) and (4,2). The inversion table B1,B2,...,Bn of the permutation { A1,A2,...,An } is obtained by letting Bj be the number of elements to the left of j that are greater than j. (In other words, Bj is the number of inversions whose second component is j.) For example, the permutation: { 5,9,1,8,2,6,4,7,3 } has the inversion table 2 3 6 4 0 2 2 1 0 since there are 2 numbers, 5 and 9, to the left of 1; 3 numbers, 5, 9 and 8, to the left of 2; etc. Perhaps the most important fact about inversions is Marshall Hall's observation that an inversion table uniquely determines the corresponding permutation. So your task is to convert a permutation to its inversion table, or vise versa, to convert from an inversion table to the corresponding permutation. Input The input consists of several test cases. Each test case contains two lines. The first line contains a single integer N ( 1 <= N <= 50) which indicates the number of elements in the permutation/invertion table. The second line begins with a single charactor either 'P', meaning that the next N integers form a permutation, or 'I', meaning that the next N integers form an inversion table. Output For each case of the input output a line of intergers, seperated by a single space (no space at the end of the line). If the input is a permutation, your output will be the corresponding inversion table; if the input is an inversion table, your output will be the corresponding permutation. Sample Input 9 P 5 9 1 8 2 6 4 7 3 9 I 2 3 6 4 0 2 2 1 0 0 Sample Output 2 3 6 4 0 2 2 1 0 5 9 1 8 2 6 4 7 3
输出多项式的系数使得给定的方程成立，怎么用C语言的程序的设计的代码编写的思想方法来实现的_course
20190613Problem Description Li Zhixiang have already been in “Friendship” oceangoing freighter for three months. The excitement has gradually disappeared. He stands on the board, holding the railing and watching the dazzling ocean in the sun silently. Day after day, the same scenery is monotonous and tasteless, even the merry seagulls following the freighter cannot arouse his interest. Hearing the footsteps behind, he turns back to see the old captain is coming towards him. The captain has understood his idea, however, he starts a new topic with the young man. “Do you know how far our voyage is?” The captain asks. Li Zhixiang feels ashamed because he can not answer. Then the captain says with a smile, “5050 miles. Do you still remember the story of 5050?” This time the young man really blushes. The old captain continues saying:” You definitely know the story of 5050. When the German mathematician, “the prince of mathematicians”, Gauss was 10 years old …” Young man remembers this story and goes on to tell, “ When Gauss was 10 years old, he could add a list of integers from 1 to 100 in a few seconds, which shocked the teachers.” The old captain adds, “Gauss has many other stories like this. When he entered the university at the age of 17, he was able to construct heptadecagon by compass and straightedge. His university teachers were also impressed by his ability. Not only could college graduate students fail to do it, but also they felt hard to understand Gauss’s constructing process.” At this time, vicecaptain greets the old captain. The old captain says to Li Zhixiang: “Come over to my office tonight, let’s continue the conversation.” It is still calm and tranquil in the evening. The freighter travels smoothly on the sea in the silver moonlight. The captain tells the young man the following words. Among the mathematicians through the ages, there are three greatest mathematicians: Archimedes, Newton and Gauss. Most of Gauss’s mathematical achievements are difficult to understand. Nevertheless, there are some comparatively easy. For instance, when it comes to solving multivariate system of linear equations, there is a solution called “Gauss Elimination”. In the navigation business, many problems can be solved by “Gauss elimination”. If you are interested in it, I will show you a simple question. Try it.” Input There are several test cases. In the first line of each case, a number n indicates that there are n equations. The following n lines, each line has n+1 numbers, ai1,ai2,ai3…..ain, bi(1<= i <=n), these numbers indicate the coefficients of systems of the equations. ai1*x1+ai2*x2+......ain*xn=bi. Input is terminated by the end of file. Output For each given systems of equations, if there are solutions, output n solutions in the order of appearance in the equations（n<=100）, each solution number is in one line. If solution is not integer, show it in fraction. If no solution, output “No solution.” Leave a blank line after each case. Sample Input 2 1000000000000000000000000 1000000000000000000000000 1000000000000000000000000 1000000000000000000000000 1000000000000000000000000 0 1 0 4 Sample Output 1/2 1/2 No solution.
 172KB
谷粒商城 2020.5月最新升级全套版基础+高级+高可用集群.zip
20200714谷粒商城2020.5月最新升级全套版基础+高级+高可用集群，已完结！有课件
极简JAVA学习营第五期（报名以后加助教微信：eduxy1）
20200119想学好JAVA必须要报两万的培训班吗？ 【课程背景】 JAVA是市场份额最大的编程语言，每天各大招聘网站上都会有数万个JAVA开发工程师的在招岗位，但是JAVA的技术体系庞大复杂，要想扎实掌握JAVA不是一件容易的事，线上学习相比线下两万起的高昂费用便宜了很多，而且具备学习时间灵活的优势，但是线上学习的劣势也很明显，没有线下那种学习氛围，碰到问题没法解决，在家学习很容易偷懒，极简JAVA学习营充分考虑到这些问题，通过每日实战编程练习，分队pk,助教答疑，作业点评，作业讲解，项目答辩等诸多环节充分激发你的学习热情，解决你学习中碰到的问题，让你花十分之一的钱学到JAVA的精髓，开启你的人生逆袭之路。 【专项的贴心服务】 1. 学练结合：定期布置视频任务和编程实战练习：通过每天的视频任务统一大家的进度，以便同学更好的交流，针对每天的任务会有相应的编程实战练习，通过练习内化知识。 2. 分队PK：将就业营的同学分成几队，通过作业统计表统计每队提交作业情况进行PK,激发你的学习动力。 3. 助教讲师答疑：碰到任何问题，发到群里，助教和讲师十分钟内帮你解决问题，扫清学习中的障碍。 4. 助教点评讲解作业：你每天提交作业都会有助教进行点评，让你知道有什么问题怎么解决，每三天一次视频讲解作业，互动解答问题 5. 项目答辩：每个阶段学完会有项目答辩，通过做项目巩固前一阶段的知识点，锻炼编码能力。 【往期训练营学习展示】 【套餐内容简介】 本套课以市场就业和职位需求为核心，从JAVA入门到多领域实战，设计出学习路线，共分为二十大模块，分别是：JAVA面向对象、Object类与常用API、集合框架、IO流、反射注解、多线程与网络编程、Object类与常用API等等。 同时采用理论讲解加实战演练的方式，既能让学员听懂听明白达到理解透彻，又能够在一个个真实实战案例中，让学员掌握真正有用的开发技能，从而进阶 JAVA 工程师！ 套餐中一共包含21门JAVA程，助你从零进阶JAVA工程师！ 阶段一：JAVA基础 课程1：《极简JAVA学习营开营篇》 课程2：《极简JAVA：JAVA面向对象》 课程3：《极简JAVA：Object类与常用API》 课程4：《极简JAVA：集合框架》 课程5：《极简JAVA：IO流》 课程6：《极简JAVA：反射注解》 课程7：《极简JAVA：多线程与网络编程》 阶段二：数据库入门 课程8：《极简JAVA：MySql数据库》 课程9：《极简JAVA：JDBC与连接池》 阶段三：JAVA WEB 课程10：《极简JAVA：HTML5与CSS3》 课程11：《极简JAVA：极简JAVA十一:Javascript与Jquery》 课程12：《极简JAVA：BootStrap》 课程13：《极简JAVA：JAVA Web》 阶段四：框架实战 课程14：《极简JAVA：Mavean入门》 课程15：《极简JAVA：MyBatis框架》 课程16：《极简JAVA：Spring框架》 课程17：《极简JAVA：Spring Mvc》 课程18：《极简JAVA：Oracle数据库》 课程19：《极简JAVA：Git入门》 课程20：《极简JAVA：Linux入门》 课程21：《极简JAVA：SpringBoot》 【课程特色】 1、易理解：讲师思路清晰、节奏明确、从易到难讲解透彻明白； 2、知识全：知识全面系统，从JAVA入门到实战，由易到难，让你彻底掌握JAVA开发； 3、重实战：涵盖大量实战项目，锻炼你的动手实操能力，面向工作编程； 【面向人群】 1、在校计算机专业或者对软件编程感兴趣的学生； 2、零基础想学JAVA却不知道从何入手 3、囊中羞涩，面对两万起的JAVA培训班不忍直视 4、在职没有每天大块的时间专门学习JAVA 这么细致的服务，这么好的氛围，这样的学习效果，你还等什么？赶紧报名吧，抓紧抢位，本期只招100人，错过只有等时间待定的下一期了
 9.73MB
2019全国大学生数学建模竞赛C题原版优秀论文
202001192019全国大学生数学建模竞赛C题原版优秀论文，PDF原版论文，不是图片合成的，是可编辑的文字版。共三篇。 C044.pdf C137.pdf C308.pdf
 1.23MB
2020深圳杯a题+代码+数据.zip
202008062020年深圳杯a题，国赛前培训当练习题做，没参赛，反正也没用了，发上来供大家参阅，觉得有用给个赞。
 博客 IPV6 NDP协议/IPV6 ICMP重定向
 下载 物流管理无线PDA终端系统
 博客 RabbitMQ的高级用法
 博客 剑指 Offer 29. 顺时针打印矩阵题解
 博客 ic芯片写卡软件的分类
 下载 基于FPGA的雷达回波实时模拟器的实现
 学院 2020年最新 k8s基础进阶
 学院 【数据分析】第二周数据科学原理与数据处理
 博客 Shortest Path
 博客 python爬取豆瓣电影榜单
 学院 Java全栈工程师MyBatis框架
 下载 51单片机软件用定时器模拟串口程序
 下载 正温度系数热敏电阻原理
 下载 滴定法 GB/T 20166.12012 稀土抛光粉化学分析方法 第1部分：氧化铈量的测定
 学院 Python+FFmpeg搭建直播网站
 博客 java 通过继承Thread创建线程
 学院 新增套餐测试
 学院 前端入门到全栈一卡通
 学院 Python并发编程（纯面授课程）
 学院 YOLOv4tiny目标检测实战：训练自己的数据集
 学院 Linux运维与云计算实战指南2020版零起点基础篇②
 博客 知识点到面2020.08.08
 博客 vue {模块化 webpack 脚手架 006}
 博客 杰里之 2.6.2 、2.6.3 音箱 SDK 不播歌时与 iPhone 同步音量修改【篇】
 下载 能自动点火的煤气熄火报警器
 学院 Prometheus+Grafana 全方位监控系统
 学院 Kubernetes/K8s架构师实战（初中级）
 下载 做安防必须知道的CCD芯片知识
 博客 python机器学习——实现bagging及随机森林（回归）
 学院 Python期货量化投资