没明白，其他的不都在other里面吗，可以看啊
- 情人节也放假 回复Humphrey_Hyh: 不是吧，默认就有一个other的呢，我是这样的，当你显示最高级用workset的时候，如果没创建任何一个workset，那么现有的项目都是在other里的
- 3 年多之前 回复
- Humphrey_Hyh other是我自己又创建的，不创建就看不见
- 3 年多之前 回复
- 其他相关推荐
- 在eclipse中如何把working set 里删除的项目回复回来，没有从本地删除
- 在eclipse中如何把working set 里删除的项目回复回来，没有从本地删除
- A very hard mathematic problem 数学的问题
- Problem Description Haoren is very good at solving mathematic problems. Today he is working a problem like this: Find three positive integers X, Y and Z (X < Y, Z > 1) that holds X^Z + Y^Z + XYZ = K where K is another given integer. Here the operator “^” means power, e.g., 2^3 = 2 * 2 * 2. Finding a solution is quite easy to Haoren. Now he wants to challenge more: What’s the total number of different solutions? Surprisingly, he is unable to solve this one. It seems that it’s really a very hard mathematic problem. Now, it’s your turn. Input There are multiple test cases. For each case, there is only one integer K (0 < K < 2^31) in a line. K = 0 implies the end of input. Output Output the total number of solutions in a line for each test case. Sample Input 9 53 6 0 Sample Output 1 1 0
- Spy's Work 代码设计的思路
- Problem Description I'm a manager of a large trading company, called ACM, and responsible for the market research. Recently, another trading company, called ICPC, is set up suddenly. It's obvious that we are the competitor to each other now! To get some information about ICPC, I have learned a lot about it. ICPC has N staffs now (numbered from 1 to N, and boss is 1), and anybody has at most one superior. To increase the efficiency of the whole company, the company contains N departments and the ith department is led by the ith staff. All subordinates of the ith staff are also belong to the ith department. Last week, we hire a spy stealing into ICPC to get some information about salaries of staffs. Not getting the detail about each one, the spy only gets some information about some departments: the sum of the salaries of staff s working for the ith department is less than (more than or equal to) w. Although the some inaccurate information, we can also get some important intelligence from it. Now I only concerned about whether the spy is telling a lie to us, that is to say, there will be some conflicts in the information. So I invite you, the talented programmer, to help me check the correction of the information. Pay attention, my dear friend, each staff of ICPC will always get a salary even if it just 1 dollar! Input There are multiple test cases. The first line is an integer N. (1 <= N <= 10,000) Each line i from 2 to N lines contains an integer x indicating the xth staff is the ith staff's superior(x<i). The next line contains an integer M indicating the number of information from spy. (1 <= M <= 10,000) The next M lines have the form like (x < (> or =) w), indicating the sum of the xth department is less than(more than or equal to) w (1 <= w <=100,000,000) Output For each test case, output "True" if the information has no confliction; otherwise output "Lie". Sample Input 5 1 1 3 3 3 1 < 6 3 = 4 2 = 2 5 1 1 3 3 3 1 > 5 3 = 4 2 = 2 Sample Output Lie True
- MyEclipse里面设置了几个working set ，新建的项目总是跑到other project里面
- MyEclipse里面设置了几个working sets ，新建的项目总是跑到other projects里面，这是啥情况，求大神解答
- windows 下性能监视器中系统的cache bytes与System Cache Resident Bytes 持续慢上涨，排查不出问题
- windows 下性能监视器中系统的cache bytes与System Cache Resident Bytes 持续慢上涨 但是我的目标程序的Private Bytes、Working Set、Working Set-Private都保持稳定，系统的所有进程的Private Bytes、Working Set也保持稳定不变 目标程序的IO Data Bytes/sec 也持续慢上涨 请教这一般会出现在什么情况下？？ 上涨的比较慢，一般监测好几个小时才能看出一点儿，监测好几天才能明显看出上涨，对这几个指标不太明白，希望大神求教！！！
- One and One Story 算法用C语言
- Problem Description Have you ever played the romantic Flash game, "One and One Story"?1 In this story of a boy and a girl and their romance you are to direct them to meet together as they face their euphoria and trials of their relationship. You, as a member of the FFF Inquisition, 2 are fed up with such game since you believe that to make things fair, you should not keep providing guidance information while risking remaining forever alone 3 . So you decided to write a program working out guidance for these sweet small lovers on behalf of you. ( Another reason is, you have to help K couples, which would make you somewhat overwhelmed. ) Fortunately, you are to handle not the Flash game above, but a simplified version: In the game, a maze consists of some rooms connected with one-way hallways. For each room, there is exactly one outgoing hallway here, and it would lead directly to some room (not necessarily a different one). The boy and girl are trapped in (not necessarily different) rooms. In each round of the games, both of them could choose to stay in the current room or walk to the room to which the unique outgoing hallway leads. Note that boy and girl could act independently of each other. Your goal is to come to the reunion between them. Your program should determine a pair of numbers (A,B) for each couple of boy and girl, where A represents number of hallway the boy walked through, B the girl, that could lead reunion between them. First, your program should minimize max(A,B). If there are several solutions, you should then guarantee that min(A,B) is minimized subject to above. If, satisfying above conditions, there are still multiple solutions, girl should walk less, that is you should then keep A >= B subject to conditions above. In case they could not reunion, just let A = B = -1. --------------------------------------------------------------------------------- 1It’s available here: http://armorgames.com/play/12409/one-and-one-story 2See http://bakatotest.wikia.com/wiki/FFF_Inquisition 3http://foreveralonecomic.com/ Input There're several test cases. In each test case, in the first line there are two positive integers N and K (1 <= N <= 500000; 1 <= K <= 500000) denoting the number of rooms and number of couples. Rooms a numbered from 1 to N. The second line contains n positive integers: the ith integer denotes the number of room to which the hallway going out of room i leads. The following K lines are queries of several couples. Each query consists of two positive integers in a single line denoting the numbers of rooms where the lovers currently are: first the boy, then the girl. Please process until EOF (End Of File). Output For each test case you should output exactly K lines, one line per query. Each line consists two integers separated by a space: the integer A and B for this couple. See samples for detailed information. Sample Input 12 5 4 3 5 5 1 1 12 12 9 9 7 1 7 2 8 11 1 2 9 10 10 5 12 5 4 3 5 5 1 1 12 12 9 9 7 1 7 2 8 11 1 2 9 10 10 5 Sample Output 2 3 1 2 2 2 0 1 -1 -1 2 3 1 2 2 2 0 1 -1 -1
- Assignments 分配的问题
- Problem Description In a factory, there are N workers to finish two types of tasks (A and B). Each type has N tasks. Each task of type A needs xi time to finish, and each task of type B needs yj time to finish, now, you, as the boss of the factory, need to make an assignment, which makes sure that every worker could get two tasks, one in type A and one in type B, and, what's more, every worker should have task to work with and every task has to be assigned. However, you need to pay extra money to workers who work over the standard working hours, according to the company's rule. The calculation method is described as follow: if someone’ working hour t is more than the standard working hour T, you should pay t-T to him. As a thrifty boss, you want know the minimum total of overtime pay. Input There are multiple test cases, in each test case there are 3 lines. First line there are two positive Integers, N (N<=1000) and T (T<=1000), indicating N workers, N task-A and N task-B, standard working hour T. Each of the next two lines has N positive Integers; the first line indicates the needed time for task A1, A2…An (Ai<=1000), and the second line is for B1, B2…Bn (Bi<=1000). Output For each test case output the minimum Overtime wages by an integer in one line. Sample Input 2 5 4 2 3 5 Sample Output 4
- Power Stations 电站的问题
- Problem Description There are N towns in our country, and some of them are connected by electricity cables. It is known that every town owns a power station. When a town’s power station begins to work, it will provide electric power for this town and the neighboring towns which are connected by cables directly to this town. However, there are some strange bugs in the electric system –One town can only receive electric power from no more than one power station, otherwise the cables will be burned out for overload. The power stations cannot work all the time. For each station there is an available time range. For example, the power station located on Town 1 may be available from the third day to the fifth day, while the power station on Town 2 may be available from the first day to the forth day. You can choose a sub-range of the available range as the working time for each station. Note that you can only choose one sub-range for each available range, that is, once the station stops working, you cannot restart it again. Of course, it is possible not to use any of them. Now you are given all the information about the cable connection between the towns, and all the power stations’ available time. You need to find out a schedule that every town will get the electricity supply for next D days, one and only one supplier for one town at any time. Input There are several test cases. The first line of each test case contains three integers, N, M and D (1 <= N <= 60, 1 <= M <= 150, 1 <= D <= 5), indicating the number of towns is N, the number of cables is M, and you should plan for the next D days. Each of the next M lines contains two integers a, b (1 <= a, b <= N), which means that Town a and Town b are connected directly. Then N lines followed, each contains two numbers si and ei, (1 <= si <= ei <= D) indicating that the available time of Town i’s power station is from the si-th day to the ei-th day (inclusive). Output For each test case, if the plan exists, output N lines. The i-th line should contain two integers ui and vi, indicating that Town i’s power station should work from the ui-th day to vi-day (inclusive). If you didn’t use this power station at all, set ui = vi = 0. If the plan doesn’t exist, output one line contains “No solution” instead. Note that the answer may not be unique. Any correct answers will be OK. Output a blank line after each case. Sample Input 3 3 5 1 2 2 3 3 1 1 5 1 5 1 5 4 4 5 1 2 2 3 3 4 4 1 1 5 1 5 1 5 1 5 Sample Output 1 5 0 0 0 0 No solution
- X-Boxes 的实现办法
- Problem Description Crazygirl is a crazy fan of XBOX games. Today, she’s here middle in a competition, in which the winner will be rewarded with an opportunity of working in the XBOX Company as a game testing player. Now, here comes the final game. As Cazygirl get a draw with the other competitor, Lich King, she must beat Lich this time. The game is quite simple. There are n balls numbered from 1 to n and k boxes B1, B2,…, Bk satisfying following conditions: 1. With any ball x in box Bi, there must be ball 2x in box Bi+1 if there is a box Bi+1; 2. With any ball x in box Bi, there must be ball y in box Bi-1 satisfying 2y=x if there is a box Bi-1; 3. You can’t put a ball in two different boxes at the same time; 4. Your score is the number of balls in box B1; 5. The player who get the highest score win the game of course. So, you should tell Crazygirl the highest score she can get. Input The first line is the number of test cases. Each test case has one line containing two integers n and k, meaning that there are n balls and k boxes. ( 1≤n≤1010000, 2≤k≤25 ) Output For each test case, output one line that contains an integer equals to the highest score you can get. Sample Input 3 10 2 7 5 8 3 Sample Output 4 0 1
- 如何在ubuntu服务器部署uwsgi和nginx使我的django项目可以启动
- django项目已经部署好，虚拟环境已经可以配置好， 项目目录： /data/mywork 在该目录下，启用虚拟环境用python3 manage.py runserver 0:8000可以正常启动网页 但是在配置uwsgi之后，只能出现： Welcome to nginx! If you see this page, the nginx web server is successfully installed and working. Further configuration is required. For online documentation and support please refer to nginx.org. Commercial support is available at nginx.com. Thank you for using nginx. 却无法访问我的网页，麻烦专家帮助解决
- A Captivating Match
- Problem Description The FIFA 2010 Soccer World Cup has gone, Small Jan returned to her own planet. After she saw the Spain emerged the biggest winner, she believe that, as a Queen, she can also arrange a captivating match-International Cavalry PK Contest(ACM-ICPC) for her lovely and hard working subjects. But her subjects are so busying that they have no time to watch the group match. So, our smart Queen wants to make the final more valuable. Every Knight has a value in people’s minds and the final’s value is dependent on the last valiancy Knights (equals to the winner's value). Now assuming that the Knights have been numbered from 1 to N, and any time Small Jan could arrange a match between any two Knights adjacent to each other, but the loser will quit. For example, (1, 2, 3, 4, 5),if the Queen arranged Knights 3 and 4 for a match and Knight 3 lost, then Knights 2 and 4 would be adjacent to each other (the result of each Knight competing with others is saved in a table). Here, Small Jan want to know the max value of the final, can you help her? Input The first line of the input is a single positive integer T(0 < T <= 30), telling the number of test scenarios to follow. Each scenario begins with a line containing an integer N, 0 < N <= 100, being the number of Knights. The following line contains N integers, 0 < Vi < 1000, being the value of each Knight in people’s minds. Thelast is a N × N matrix. If a[i,j] = 1 indicate when Knight i competing with j, Knight i always win, which also means a[j, i] must equals 0 and if i=j, a[i,j] must equals 0. Output For each input case, output a line containing a single number, which is the max value of the final, following the case number (start with 1) Sample Input 2 3 1 2 3 0 1 0 0 0 1 1 0 0 3 1 2 3 0 1 1 0 0 0 0 1 0 Sample Output Case 1: 3 Case 2: 1
- Cranes 请问是如何编写的
- Problem Description A crane is a wonderful tool for putting up a building. It makes the job go very quickly. When the building must go up even faster, more than one crane can be used. However, when there are too many cranes working on the same building, it can get dangerous. As the cranes spins around, it can bump into another crane if the operator is not careful. Such an accident could cause the cranes to fall over, possibly causing major damage. Therefore, safety regulations require cranes to be spaced far enough apart so that it is impossible for any part of a crane to touch any part of any other crane. Unfortunately, these regulations limit the number of cranes that can be used on the construction site, slowing down the pace of construction. Your task is to place the cranes on the construction site while respecting the safety regulations. The construction site is laid out as a square grid. Several places on the grid have been marked as possible crane locations. The arm of each crane has a certain length r, and can rotate around the location of the crane. The crane covers the entire area that is no more than r units away from the location of the crane. You are to place the cranes to maximize the total area covered by all the cranes. Input The first line of each test chunk contains one integer specifying the number of test cases in this chunk to follow. Each test case begins with a line containing an integer C, the number of possible locations where a crane could be placed. There will be no more than 15 such locations. Each of the following C lines contains three integers x, y, and r, all between -10 000 and 10 000 inclusive. The first two integers are the grid coordinates of the location, and the third integer is the length of the arm of the crane that can be placed at that location. Please process to the end of the data file. Output For each test case, find the maximum area A that can be covered by cranes, and output a line containing a single integer B such that A = B × π . Sample Input 1 3 0 0 4 5 0 4 -5 0 4 1 3 0 0 4 5 0 4 -5 0 4 Sample Output 32 32
- The Covering Polygon 程序的实现
- Problem Description Martians are invading the earth! Yes, it's not an illusion, it's the truth. Their attack are so quickly and unpredictable that few people realize it until many most buildings are destroyed. As a human being on the earth, you feel it's your duty to protect your homeland. After scouting, you find there are some powerful weapons which are still working well on the land. They are the last hope to defeat the Martains, so all of them should be protected. And there are a few of defensive devices can be used. If you activate these devices in the order D1, D2, .., Dn, then there will be a laser line between D1 and D2, D2 and D3, ..., Dn and D1, which forms a polygon. Everything enclosed by the polygon or laid on the boundary can be protected well. Due to some physical reasons, nonadjacent laser lines can not intersect (even intersect at end points), or they will disappear and leave a hole in the polygon, which Martains can go through to destroy everything. Of course, no devices can be activated two or more times. The final wave of Martains is near, so you need design a plan to construct our defence quickly. Activating a defensive device is very hard and time-consuming, so you should active as few as possible to protect all the weapons. You have the ability, and you have the duty, too. Input The beginning of the input is an integer T (T <= 30), which is the number of test cases. T cases are followed. The first line of each test case is two integers sizeA (3 <= sizeA <= 500) and sizeB (3 <= sizeB <= 200000), which denote the number of defensive devices and the number of weapons respectively. Each of them can be considered as a point in 2D euclid plane. The next sizeA+sizeB lines are positions of devices and weapons, each of which contains two integers describing its x and y coordinates. The first sizeA lines are points of defensive devices, and the last sizeB lines are points of weapons. The absolute value of all coordinates are not greater than 10^8. Positions of any two objects in the same test case are distinct. Because of some strange reasons, not all of the weapons are on the same line. Output For each test case, print a line contains a single integer which is the least devices to be actived to protect all weapons. If all weapons can not be protected, output -1 instead. Sample Input 2 4 3 1 1 2 2 3 3 4 4 5 5 6 6 7 9 7 3 0 5 5 0 -5 0 100 100 -100 -100 100 -100 -100 100 0 0 0 1 1 1 Sample Output -1 3
- Code Management System 代码管理编写
- Problem Description Jack’s company has a very long program to modify. Each programmer edits some lines of that program and cannot add or delete any lines. A programmer can do three kinds of operations as below: - SYNC: At the beginning, every programmer must do this to download the whole program from the code center to their local machine. This operation only executes once for each programmer. - MODIFY: Modify a line of the code. The modification work will be temporarily done on the local computer. - SUBMIT: Submit one’s whole local code to the code center. The code center will handle all possible changes and then send the whole newest program back to the submitter. We assume that the time duration of handling changes and sending back can be omitted. The code center records the time and the performer of every operation. As you see, a programmer can get the program from the code center only when he performs a SYNC or a SUBMIT operation. We call the version in the code center “standard version.” The code center keeps only ONE standard version. Imagining there are two programmers who download the same version of the program and they both modify the ith line. Then they both submit their programs. Now what will the ith line be in the standard version? Jack figures out a rule. He gives each programmer a unique priority. When a programmer (Let’s name him Tom) modifies the ith line and then submit his program, the code center will handle the content of the ith line following the rules below: 1. If there was no accepted modification on the ith line before, Tom’s modification will be accepted. That means, the ith line in the standard version becomes the same as the ith line in the program submitted by Tom, and so Tom becomes the author of this line. 2. Otherwise, if the time of the last accepted modification on the ith line, is earlier than the time when Tom got the program from code center last time (Tom can get the program by SYNC or SUBMIT operation), Tom’s modification will be accepted. This situation means that there was no newly accepted modification on the ith line during the time from the ith line’s last accepted modification to Tom’s submission. 3. Otherwise, if Tom’s priority is higher than the priority of the last author of the ith line, Tom’s modification will be accepted. 4. In other cases, Tom’s modification on the ith line this time will be ignored and never be processed again. 5. If Tom’s modification was accepted, the code center would record the modification time of the ith line as the time when Tom’s SUBMIT operation happened. Please note that a programmer can modify multiple lines before he submits, and his modification on some lines may be accepted, but on the other lines may be ignored. For example, Alice and Bob are two programmers. Alice’s priority is 1 and Bob’s is 2(2 is higher than 1). In following case A and B, Bob’s modification on the first line will be accepted. However, Alice’s modification will be ignored in Case C but will be accepted in Case D. Case A [2010/07/18 12:00:00] Alice SYNC [2010/07/18 12:00:01] Bob SYNC Alice and Bob are editing the first line. [2010/07/18 12:05:00] Alice SUBMIT [2010/07/18 12:06:00] Bob SUBMIT Case B [2010/07/18 12:00:00] Alice SYNC Alice is editing the first line. [2010/07/18 12:05:00] Alice SUBMIT [2010/07/18 12:05:01] Bob SYNC Bob is editing the first line [2010/07/18 12:06:00] Bob SUBMIT Case C [2010/07/18 12:00:00] Alice SYNC [2010/07/18 12:00:02]Bob SYNC Alice and Bob are editing the first line. [2010/07/18 12:05:00]Bob SUBMIT [2010/07/1812:06:00]Alice SUBMIT Case D [2010/07/18 12:00:00] Bob SYNC Bob is editing the first line. [2010/07/18 12:05:00]Bob SUBMIT [2010/07/18 12:05:01]Alice SYNC Alice is editing the first line [2010/07/18 12:06:00]Alice SUBMIT You need to help Jack to figure out who is the last author of every code line in the final standard version of the program. Input The input contains several test cases. For each test case, the first line contains an integer n (0<n<=10000), representing the number of programmers. The following lines contain their working details. For each programmer, the first line contains a string and two integers pi and qi. The string represents his/her name, which only contains letters. The length of each name is less than 30. pi is his/her priority number and qi is the number of operations his/her has done. Each of the following qi lines contains a single operation. The format is as following: “[yyyy/mm/dd hh:mm:ss] OPERATION” There is a blank between day(dd) and hour(hh), as well as the right square bracket and OPERATION. The OPERATION has three formats: “SYNC”, “MODIFY line_id” and “SUBMIT”. The line_id was an integer representing the certain line number on which this modification happens. There is a blank between MODIFY and line_id. There is no extra blank. The line numbers and priority numbers are integers from 0 to 231-1. The sum of all the qi is less than or equal to 50000. You can assume that all operations happen in different time. The input file ends by a single 0 in a line. Output For each test case, details of each modified line should show in a line. The format is as follows: “line_id [yyyy/mm/dd hh:mm:ss] BY name” The line_id is the certain line which has been modified. The date shows the time of its last accepted modification and name shows the author. There’s a single white blank between line_id and the left bracket, as well as the day(dd) and hour(hh), the right bracket and “BY”, “BY” and name. Beside these, there’s no spare white blank. The lines are sorted increasingly by line_id. At the end of each test case, there is a single line contains a word “END”. Sample Input 2 Alice 1 3 [2010/07/18 12:00:00] SYNC [2010/07/18 12:01:00] MODIFY 1 [2010/07/18 12:05:00] SUBMIT Bob 2 3 [2010/07/18 12:00:01] SYNC [2010/07/18 12:01:30] MODIFY 1 [2010/07/18 12:06:00] SUBMIT 2 Alice 1 3 [2010/07/18 12:05:01] SYNC [2010/07/18 12:05:30] MODIFY 1 [2010/07/18 12:06:00] SUBMIT Bob 2 3 [2010/07/18 12:00:01] SYNC [2010/07/18 12:01:30] MODIFY 1 [2010/07/18 12:05:00] SUBMIT 0 Sample Output 1 [2010/07/18 12:06:00] BY Bob END 1 [2010/07/18 12:06:00] BY Alice END
- I love sneakers! 如何来编写的
- Problem Description After months of hard working, Iserlohn finally wins awesome amount of scholarship. As a great zealot of sneakers, he decides to spend all his money on them in a sneaker store. There are several brands of sneakers that Iserlohn wants to collect, such as Air Jordan and Nike Pro. And each brand has released various products. For the reason that Iserlohn is definitely a sneaker-mania, he desires to buy at least one product for each brand. Although the fixed price of each product has been labeled, Iserlohn sets values for each of them based on his own tendency. With handsome but limited money, he wants to maximize the total value of the shoes he is going to buy. Obviously, as a collector, he won’t buy the same product twice. Now, Iserlohn needs you to help him find the best solution of his problem, which means to maximize the total value of the products he can buy. Input Input contains multiple test cases. Each test case begins with three integers 1<=N<=100 representing the total number of products, 1 <= M<= 10000 the money Iserlohn gets, and 1<=K<=10 representing the sneaker brands. The following N lines each represents a product with three positive integers 1<=a<=k, b and c, 0<=b,c<100000, meaning the brand’s number it belongs, the labeled price, and the value of this product. Process to End Of File. Output For each test case, print an integer which is the maximum total value of the sneakers that Iserlohn purchases. Print "Impossible" if Iserlohn's demands can’t be satisfied. Sample Input 5 10000 3 1 4 6 2 5 7 3 4 99 1 55 77 2 44 66 Sample Output 255
- Tour Guide 导游的算法
- Problem 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
- Operating system 操作系统的问题
- Problem Description As a CS student, operating system is an important lesson. Today, let’s think about the cache’s working mode. All object accesses go through the cache, so every time an object is accessed, it must be inserted into the cache if it was not already there. If the cache is full, you must take out a object which is already in the cache . All objects are of equal size, and no writes occur in the system, so a cached object is always valid. When the system starts, the cache is empty. To make cache works efficiently, we need find the optimal replacement algorithm. Optimality here means minimizing the number of times an object is read into the cache. Input There are several test cases in the input. Each test case begins with three integers(C,N,B), separated by single spaces, telling you how many objects fit in the cache, 0 < C ≤ 10000, how many different objects are in the system, C ≤ N ≤ 100000, and how many accesses, 0 ≤ B ≤ 100000, will occur. The following line contains B integers between 0 and N-1 (inclusive) indicating what object is accessed. Output For each test case, output one integer, indicating the least number of times an object must be read into the cache to handle the accesses. Sample Input 1 2 3 0 1 0 2 2 3 0 1 0 Sample Output 3 2
- Help-or-else 运用什么方式实现的
- Problem Description A penal colony for finance professionals will soon be holding its annual community service activity with some rules that are considered suitable for a penal colony. Every inmate is assigned a set P of N people to help with their finances and a limit of K minutes. In addition to the circumstances of the jth person, 1 <= j <= N, a time penalty of ej for choosing not to give advice and the time duration of dj minutes allotted to provide the advice are also made clear to the inmate. An inmate starts his community service at time T equal to zero. If the inmate started working with the jth person at time T, then he must terminate his work no later than T+dj. Regardless of the validity of the advice and time of completion, a value of Cj ( = T+ dj ) is deducted from the inmate's alloted minutes. Also the inmate is not permitted to work with another person until the time T+ dj. If S is the set of people helped by an inmate, then the total number of used minutes is calculated as Your task is to write a program to calculate the maximum number of persons that can be helped by an inmate without exceeding his K minutes limit. Input Input consists of sets for many inmates. The description for each inmate begins with two integers N and K, separated by a single space on a line by themselves, that represent the number of people and the maximum allowed minutes. 0 < N <= 200 and 0 < K <= 6000. Each of the following N lines contains two integers, separated by a single space, which represent the penalty and time duration one person to be assisted. All integers have values between 0 and 10000, inclusive. Input terminates with two zeros on a line by themselves. Output For each inmate, the output consists of a single line that contains the maximum number of persons to be helped within the given time limit using the format shown. “Mission Impossible” is entered where not exceeding the given time limit is not possible. Sample Input 1 1000 100 1000 2 100 1000 1000 20 10 1 1 0 10000 4 293 61 30 295 39 206 27 94 85 0 0 Sample Output 1: 1 2: Mission Impossible 3: 0 4: 3
- Network 是怎么编写的
- Problem Description The ALPC company is now working on his own network system, which is connecting all N ALPC department. To economize on spending, the backbone network has only one router for each department, and N-1 optical fiber in total to connect all routers. The usual way to measure connecting speed is lag, or network latency, referring the time taken for a sent packet of data to be received at the other end. Now the network is on trial, and new photonic crystal fibers designed by ALPC42 is trying out, the lag on fibers can be ignored. That means, lag happened when message transport through the router. ALPC42 is trying to change routers to make the network faster, now he want to know that, which router, in any exactly time, between any pair of nodes, the K-th high latency is. He needs your help. Input There are only one test case in input file. Your program is able to get the information of N routers and N-1 fiber connections from input, and Q questions for two condition: 1. For some reason, the latency of one router changed. 2. Querying the K-th longest lag router between two routers. For each data case, two integers N and Q for first line. 0<=N<=80000, 0<=Q<=30000. Then n integers in second line refer to the latency of each router in the very beginning. Then N-1 lines followed, contains two integers x and y for each, telling there is a fiber connect router x and router y. Then q lines followed to describe questions, three numbers k, a, b for each line. If k=0, Telling the latency of router a, Ta changed to b; if k>0, asking the latency of the k-th longest lag router between a and b (include router a and b). 0<=b<100000000. A blank line follows after each case. Output For each question k>0, print a line to answer the latency time. Once there are less than k routers in the way, print "invalid request!" instead. Sample Input 5 5 5 1 2 3 4 3 1 2 1 4 3 5 3 2 4 5 0 1 2 2 2 3 2 1 4 3 3 5 Sample Output 3 2 2 invalid request!
- 终于明白阿里百度这样的大公司，为什么面试经常拿ThreadLocal考验求职者了
- 点击上面↑「爱开发」关注我们每晚10点，捕获技术思考和创业资源洞察什么是ThreadLocalThreadLocal是一个本地线程副本变量工具类，各个线程都拥有一份线程私有的数
- win10系统安装教程（U盘PE+UEFI安装）
- 一、准备工作 u盘，电脑一台，win10原版镜像（msdn官网） 二、下载wepe工具箱 极力推荐微pe（微pe官方下载） 下载64位的win10 pe，使用工具箱制作启动U盘打开软件， 选择安装到U盘（按照操作无需更改） 三、重启进入pe系统 1、关机后，将U盘插入电脑 2、按下电源后，按住F12进入启动项选择（技嘉主板是F12） 选择需要启
- 程序员必须掌握的核心算法有哪些？
- 由于我之前一直强调数据结构以及算法学习的重要性，所以就有一些读者经常问我，数据结构与算法应该要学习到哪个程度呢？，说实话，这个问题我不知道要怎么回答你，主要取决于你想学习到哪些程度，不过针对这个问题，我稍微总结一下我学过的算法知识点，以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的，并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构，当然，我也会整理一些看过
- 《奇巧淫技》系列-python！！每天早上八点自动发送天气预报邮件到QQ邮箱
- 将代码部署服务器，每日早上定时获取到天气数据，并发送到邮箱。 也可以说是一个小人工智障。 思路可以运用在不同地方，主要介绍的是思路。
- Nginx 软件层面加强Nginx性能优化的面试问答和解决方案
- Nginx 软件层面加强Nginx性能优化的面试问答和解决方案 去年我去爱卡汽车面试PHP，一轮和二轮面的都不错，在三轮面到Nginx的时候很多问题当时不知道怎么回答，确实没有深入学习过，花了一段时间的学习，终于能解答Nginx高性能优化的问题了，10月24号为了获得程序员勋章，发布了半个优化笔记，浏览到了1000+，受到这个鼓舞，我抽时间在仔细整理下关于Nginx性能优化的问题，我们从软件说起。...
- 【管理系统课程设计】美少女手把手教你后台管理
- 【文章后台管理系统】URL设计与建模分析+项目源码+运行界面 栏目管理、文章列表、用户管理、角色管理、权限管理模块（文章最后附有源码） 1. 这是一个什么系统? 1.1 学习后台管理系统的原因 随着时代的变迁，现如今各大云服务平台横空出世，市面上有许多如学生信息系统、图书阅读系统、停车场管理系统等的管理系统，而本人家里就有人在用烟草销售系统，直接在网上完成挑选、购买与提交收货点，方便又快捷。 试想，若没有烟草销售系统，本人家人想要购买烟草，还要独自前往药...
- 11月19日科技资讯|华为明日发布鸿蒙整体战略；京东宣告全面向技术转型；Kotlin 1.3.60 发布
- 「极客头条」—— 技术人员的新闻圈！ CSDN 的读者朋友们早上好哇，「极客头条」来啦，快来看今天都有哪些值得我们技术人关注的重要新闻吧。扫描上方二维码进入 CSDN App 可以收听御姐萌妹 Style 的人工版音频哟。 一分钟速览新闻点！ 6G 专家组成员：速率是 5G 的 10 至 100 倍，预计 2030 年商用 雷军：很多人多次劝我放弃WPS，能坚持下来并不是纯粹的商业决定 ...
- C语言魔塔游戏
- 很早就很想写这个，今天终于写完了。 游戏截图： 编译环境: VS2017 游戏需要一些图片，如果有想要的或者对游戏有什么看法的可以加我的QQ 2985486630 讨论，如果暂时没有回应，可以在博客下方留言，到时候我会看到。 下面我来介绍一下游戏的主要功能和实现方式 首先是玩家的定义，使用结构体，这个名字是可以自己改变的 struct gamerole { char n
- 化繁为简 - 腾讯计费高一致TDXA的实践之路
- 导语：腾讯计费是孵化于支撑腾讯内部业务千亿级营收的互联网计费平台，在如此庞大的业务体量下，腾讯计费要支撑业务的快速增长，同时还要保证每笔交易不错账。采用最终一致性或离线补...
- Python爬虫爬取淘宝，京东商品信息
- 小编是一个理科生，不善长说一些废话。简单介绍下原理然后直接上代码。 使用的工具（Python+pycharm2019.3+selenium+xpath+chromedriver）其中要使用pycharm也可以私聊我selenium是一个框架可以通过pip下载 pip install selenium -i https://pypi.tuna.tsinghua.edu.cn/simple/
- Java学习笔记（七十二）—— Cookie
- 概述 会话技术： 会话：一次会话中包含多次请求和响应 一次会话：浏览器第一次给服务器发送资源请求，会话建立，直到有一方断开为止 功能：在一次会话的范围内的多次请求间，共享数据 方式： 客户端会话技术：Cookie，把数据存储到客户端 服务器端会话技术：Session，把数据存储到服务器端 Cookie 概念：客户端会话技术，将数据存储到客户端 快速入门： 使用步骤： 创建C
- 阿里程序员写了一个新手都写不出的低级bug，被骂惨了。
- 这种新手都不会范的错，居然被一个工作好几年的小伙子写出来，差点被当场开除了。
- Java工作4年来应聘要16K最后没要,细节如下。。。
- 前奏： 今天2B哥和大家分享一位前几天面试的一位应聘者，工作4年26岁，统招本科。 以下就是他的简历和面试情况。 基本情况： 专业技能： 1、 熟悉Sping了解SpringMVC、SpringBoot、Mybatis等框架、了解SpringCloud微服务 2、 熟悉常用项目管理工具：SVN、GIT、MAVEN、Jenkins 3、 熟悉Nginx、tomca
- 2020年，冯唐49岁：我给20、30岁IT职场年轻人的建议
- 点击“技术领导力”关注∆ 每天早上8:30推送 作者| Mr.K 编辑| Emma 来源| 技术领导力(ID：jishulingdaoli) 前天的推文《冯唐：职场人35岁以后，方法论比经验重要》，收到了不少读者的反馈，觉得挺受启发。其实，冯唐写了不少关于职场方面的文章，都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯
- 程序员该看的几部电影
- ##1、骇客帝国(1999) 概念：在线/离线，递归，循环，矩阵等 剧情简介： 不久的将来，网络黑客尼奥对这个看似正常的现实世界产生了怀疑。 他结识了黑客崔妮蒂，并见到了黑客组织的首领墨菲斯。 墨菲斯告诉他，现实世界其实是由一个名叫“母体”的计算机人工智能系统控制，人们就像他们饲养的动物，没有自由和思想，而尼奥就是能够拯救人类的救世主。 可是，救赎之路从来都不会一帆风顺，到底哪里才是真实的世界？
- 作为一个程序员，CPU的这些硬核知识你必须会！
- CPU对每个程序员来说，是个既熟悉又陌生的东西？ 如果你只知道CPU是中央处理器的话，那可能对你并没有什么用，那么作为程序员的我们，必须要搞懂的就是CPU这家伙是如何运行的，尤其要搞懂它里面的寄存器是怎么一回事，因为这将让你从底层明白程序的运行机制。 随我一起，来好好认识下CPU这货吧 把CPU掰开来看 对于CPU来说，我们首先就要搞明白它是怎么回事，也就是它的内部构造，当然，CPU那么牛的一个东
- @程序员，如何花式构建线程？
- 作者 |曾建责编 | 郭芮出品 | CSDN（ID：CSDNnews）在项目和业务的开发中，我们难免要经常使用线程来进行业务处理，使用线程可以保证我们的业务在相互处理之间可以保证原子性...
- 破14亿，Python分析我国存在哪些人口危机！
- 2020年1月17日，国家统计局发布了2019年国民经济报告，报告中指出我国人口突破14亿。 猪哥的朋友圈被14亿人口刷屏，但是很多人并没有看到我国复杂的人口问题：老龄化、男女比例失衡、生育率下降、人口红利下降等。 今天我们就来分析一下我们国家的人口数据吧！ 一、背景 1.人口突破14亿 2020年1月17日，国家统计局发布了 2019年国民经济报告 ，报告中指出：年末中国大陆总人口（包括31个
- 强烈推荐10本程序员在家读的书
- 很遗憾，这个鼠年春节注定是刻骨铭心的，新型冠状病毒让每个人的神经都是紧绷的。那些处在武汉的白衣天使们，尤其值得我们的尊敬。而我们这些窝在家里的程序员，能不外出就不外出，就是对社会做出的最大的贡献。 有些读者私下问我，窝了几天，有点颓丧，能否推荐几本书在家里看看。我花了一天的时间，挑选了 10 本我最喜欢的书，你可以挑选感兴趣的来读一读。读书不仅可以平复恐惧的压力，还可以对未来充满希望，毕竟苦难终
- Linux自学篇——linux命令英文全称及解释
- man: Manual 意思是手册，可以用这个命令查询其他命令的用法。 pwd：Print working directory 显示当前目录 su：Swith user 切换用户，切换到root用户 cd：Change directory 切换目录 ls：List files 列出目录下的文件 ps：Process Status 进程状态 mk
- Python实战：抓肺炎疫情实时数据，画2019-nCoV疫情地图
- 文章目录1. 前言2. 数据下载3. 数据处理4. 数据可视化 1. 前言 今天，群里白垩老师问如何用python画武汉肺炎疫情地图。白垩老师是研究海洋生态与地球生物的学者，国家重点实验室成员，于不惑之年学习python，实为我等学习楷模。先前我并没有关注武汉肺炎的具体数据，也没有画过类似的数据分布图。于是就拿了两个小时，专门研究了一下，遂成此文。 2月6日追记：本文发布后，腾讯的数据源多次变更u
- 智力题（程序员面试经典）
- NO.1 有20瓶药丸，其中19瓶装有1克/粒的药丸，余下一瓶装有1.1克/粒的药丸。给你一台称重精准的天平，怎么找出比较重的那瓶药丸？天平只能用一次。 解法 有时候，严格的限制条件有可能反倒是解题的线索。在这个问题中，限制条件是天平只能用一次。 因为天平只能用一次，我们也得以知道一个有趣的事实：一次必须同时称很多药丸，其实更准确地说，是必须从19瓶拿出药丸进行称重。否则，如果跳过两瓶或更多瓶药
- 在家远程办公效率低？那你一定要收好这个「在家办公」神器！
- 相信大家都已经收到国务院延长春节假期的消息，接下来，在家远程办公可能将会持续一段时间。 但是问题来了。远程办公不是人在电脑前就当坐班了，相反，对于沟通效率，文件协作，以及信息安全都有着极高的要求。有着非常多的挑战，比如： 1在异地互相不见面的会议上，如何提高沟通效率？ 2文件之间的来往反馈如何做到及时性？如何保证信息安全？ 3如何规划安排每天工作，以及如何进行成果验收？ ......
- 作为一个程序员，内存和磁盘的这些事情，你不得不知道啊！！！
- 截止目前，我已经分享了如下几篇文章： 一个程序在计算机中是如何运行的？超级干货！！！ 作为一个程序员，CPU的这些硬核知识你必须会！ 作为一个程序员，内存的这些硬核知识你必须懂！ 这些知识可以说是我们之前都不太重视的基础知识，可能大家在上大学的时候都学习过了，但是嘞，当时由于老师讲解的没那么有趣，又加上这些知识本身就比较枯燥，所以嘞，大家当初几乎等于没学。 再说啦，学习这些，也看不出来有什么用啊！
- 2020年的1月，我辞掉了我的第一份工作
- 其实，这篇文章，我应该早点写的，毕竟现在已经2月份了。不过一些其它原因，或者是我的惰性、还有一些迷茫的念头，让自己迟迟没有试着写一点东西，记录下，或者说是总结下自己前3年的工作上的经历、学习的过程。 我自己知道的，在写自己的博客方面，我的文笔很一般，非技术类的文章不想去写；另外我又是一个还比较热衷于技术的人，而平常复杂一点的东西，如果想写文章写的清楚点，是需要足够...
- 别低估自己的直觉，也别高估自己的智商
- 所有群全部吵翻天，朋友圈全部沦陷，公众号疯狂转发。这两周没怎么发原创，只发新闻，可能有人注意到了。我不是懒，是文章写了却没发，因为大家的关注力始终在这次的疫情上面，发了也没人看。当然，我...
- Java坑人面试题系列: 包装类（中级难度）
- Java Magazine上面有一个专门坑人的面试题系列: https://blogs.oracle.com/javamagazine/quiz-2。 这些问题的设计宗旨，主要是测试面试者对Java语言的了解程度，而不是为了用弯弯绕绕的手段把面试者搞蒙。 如果你看过往期的问题，就会发现每一个都不简单。 这些试题模拟了认证考试中的一些难题。 而 “中级(intermediate)” 和 “高级(ad
- Spring Boot 2.x基础教程：使用JdbcTemplate访问MySQL数据库
- 在第2章节中，我们介绍了如何通过Spring Boot来实现HTTP接口，以及围绕HTTP接口相关的单元测试、文档生成等实用技能。但是，这些内容还不足以帮助我们构建一个动态应用的服务端程序。不论我们是要做App、小程序、还是传统的Web站点，对于用户的信息、相关业务的内容，通常都需要对其进行存储，而不是像第2章节中那样，把用户信息存储在内存中（重启就丢了！）。 对于信息的存储，现在已经有非常非常多...
- 基于Python的人脸自动戴口罩系统
- 目录 1、项目背景 2、页面设计 3、器官识别 4、退出系统 1、项目背景 2019年新型冠状病毒感染的肺炎疫情发生以来，牵动人心，举国哀痛，口罩、酒精、消毒液奇货可居。 抢不到口罩，怎么办？作为技术人今天分享如何使用Python实现自动戴口罩系统，来安慰自己，系统效果如下所示： 本系统的实现原理是借助 Dlib模块的Landmark人脸68个关键点检测库轻松识别出人脸五官