 C++中while(n––)是什么意思？

C++中while(n––)是什么意思？
while (变量)
如果变量为0，不循环，否则循环。
n 是n = n 1，同时表达式的值是原来的n
while (n)
其实是
while (n != 0)
{
n = n  1;
...
}
n每次减一，减到零为止
首先判断n的值，当大于零时进入循环，并且n自减一
当n不等于0时执行while循环中的内容，并且n自减1，一直到n等于0时跳出while循环（n还是会自减1）
n=0时候n表示n没有减一之前的值，跳出循环后n=1；
题目说有n个测试用例，用这个循环体就能达到题目要求
 其他相关推荐
 c语言 函数的定义和调用有点问题，求助
#include<stdio.h> typedef int Status; typedef int ElemType; #define Maxsize 20 #define OK 1 #define ERROR 0 typedef struct {ElemType elem[Maxsize]; int top; }SqStack; Status lnitStack(SqStack *S); Status Push(SqStack *S,ElemType e); Status Pop(SqStack *S,ElemType *e); Status GetTop( SqStack S, ElemType *e); int StackEmpty( SqStack S ); Status zhuanhuan(int x, int n); Status lnitStack(SqStack *S) { S>top=1; } Status Push(SqStack *S,ElemType e) {if(S>top>=Maxsize1) return ERROR; else{ S>top++; S>elem[S>top]=e; return OK;} } Status Pop(SqStack *S,ElemType *e) { if(S>top==1) return ERROR; *e=S>elem[S>top]; S>top; return OK; } Status GetTop( SqStack S, ElemType *e) { if( S.top == S.base ) return ERROR; *e = *( S.top – 1 ); return OK; } int StackEmpty( SqStack S ) { if(S.top == S.base) return 1; else return 0; } Status zhuanhuan(int x, int y) { SqStack S; int e; InitStack(&S); printf("\n\n\t\t未转换的十进制数为：%d\n",x); while(x) { Push(&S,x%n); x=x/y; } printf("\n\t\t转换后的的%d进制数为：",n); while(!StackEmpty(S)) { Pop(&S,&e); printf("%d",e); } printf("\n\n"); return OK; } int main() {SqStack S; int n,e,x,y; printf("\n"); printf("1.初始化栈\n"); printf("2.压栈\n"); printf("3.弹栈\n"); printf("4.取栈顶元素\n"); printf("5.判栈空\n"); printf("6.十进制数转换成N进制数\n"); printf("7.退出\n"); while(1) { printf("请选择功能"); scanf("%d",&n); switch(n) { case 1:lnitStack(S);break; case 2:scanf("%d",&e);Push(S,e);break; case 3:Pop(S,e);printf("%d\n",e);break; case 4:GetTop(S,e);printf("%d\n",e);break; case 5:if(StackEmpty(S)) { printf("此为空\n"); } else printf("此不为空\n");break; case 6:printf("请输入要转换的十进制数");scanf("%d",&x); printf("请输入想要的进制数");scanf("%d",&y); zhuanhuan(x,y);break; case 7:break; }
 c语言，用泰勒级数求e的近似值。直到最后一项小于1e6为止。
#include "stdio.h" void main（） { float e=1.0,t=1.0； int n=1; while(1/t>(1e6)) //我没想明白是t>(1e6)，不是说直到最后一项小于1e6吗，为什么是大于号 { t=t*n; //得到 n! e=e+1/t; //累加(1/n!)，即计算此行前 e = 1+(1/1!)+(1/2!)+....+(1/(n1)!)再加上(1/n!) n++; //n : 2 3 4 ... } printf("e=%8.6f\n",e); } 我想我连泰勒级数是什么都没搞清楚还有就是while里边为什么是1/t<（1e6）
 PHP：如何在不使用for / while循环的情况下连续打印文本
<div class="posttext" itemprop="text"> <p>Without using a for/while loop or any kind of string repeat function and a single PHP file, print out the text “All work and no play makes jack a dull boy” to the screen 200 times in a list – Grade C: 15 lines of code – Grade B: 10 lines of code – Grade A: 7 lines of code – Grade A*: 4 lines of code (VERY difficult)</p> <p>– n.b. a “line” counts as a statement. Each closing brace must go on its own line, function calls on their own line and function declarations on their own line. PHP tags </p></div>
 一个球队比赛的位置问题，不同字母代表不同位置，用C语言怎么做呢
Problem Description Football Manager is a series of football management simulation games developed by Sports Interactive and published by Sega. In this game, you will play a role of a football club manager and conduct your team to chase championship titles. As a football team manager, you need to take responsibilities for tactics developing, training arrangements, onpitch commanding, player trading, etc. One of the most important things is to select your starting lineup. According to the rules of football matches, there should be 11 players in your starting lineup, where one of them must be a goalkeeper. Besides the goalkeeper (GK), there’re three classes of positions: defender (DF), midfielder (MF), and striker (ST). When a manager is selecting his starting lineup, he usually determines the formation first. The football formation is usually noted like “442”“451”“43 3”, etc. For example, the “451” formation denotes that there are 4 defenders, 5 midfielders and 1 striker. Note that every player has his preferred positions, and they will always refuse to appear at positions he does not prefer, while some excellent players may be qualified for several positions. For example, C. Ronaldo can play as both a striker and a midfielder. In the game, players have two important attributes for each of his preferred positions: CA (current ability) and PA (potential ability). The CA of the lineup is defined as the sum of the 11 players’ CA in the formation. Similar to CA, the PA of the lineup equals to the sum of 11 players’ PA. Then your task is to select the proper players to reach maximum CA of your lineup. When a tie occurs, the one of maximum PA is required. Beyond these requirements and limits, the relationships between players also make sense to the CA of your lineup. Every player may like or dislike some of his teammates. When he and the one he likes are both on the pitch, the CA of the lineup will be increased by a specific value. On the contrary, when someone and his disliked player occurs on the pitch concurrently, the lineup’s CA will be decreased. Be careful that the like and dislike relationships between players are unidirectional. Not surprisingly, Plane.Gao likes Messi very much while Messi may not know Plane.Gao at all. Input The input contains multiple test cases. The first line of input gives the number of test cases T (1<=T<=20). For each test case, the first line contains an integer N (1<=N<=20), the total number of players in your team. Each of the following N lines describe a player in the following format: <SquadNum> <PositionNum> <pos1> <CA1> <PA1> <pos2> <CA2> <PA2> . . . <posnum><CAnum><PAnum> Here: <SquadNum> denotes the player’s unique squad number (between 1 and 99, inclusive). <PositionNum> denotes the number of positions he preferred. <pos1> <pos2> . . . <posnum> are strings chosen in {GK, DF, MF, ST},denoting all his preferred positions. <CAi> denotes his CA at <posi>. <PAi> denotes his PA at <posi>. (0<=P Ai,C Ai<=1000,note P A and CA can be negative here.) After the description of the player list, the following line will give an integer M (0<=M<=N (N  1)), which indicates the number of relationships between the teammates. Then each of the following M lines is shown in the following format: <SquadNumA> <SquadNumB > Like/Dislike <value> Here: <SquadNumA> denotes Player A’s Squad Number. <SquadNumB> denotes Player B’s Squad Number. Like/Dislike denotes the property of the relationship. <value> denotes that when both of them appear in your starting lineup, the CA of lineup will be increased/decreased by value(0<=value<=100). No two relationships of the same pair of teammates will occur. The last line of each test case shows the formation that you have determined. We guarantee that the formation is legal. You may take the sample for more details. Output For each test case, you should output two integers in a line, the best CA and PA of your lineup. If you can even not round up your lineup, please output “Poor Manager!” (without quotes) Sample Input 2 15 1 1 GK 150 160 2 1 DF 150 160 3 1 DF 150 160 4 1 DF 150 160 5 1 DF 150 160 6 1 MF 150 160 7 1 MF 150 160 8 1 MF 150 160 9 1 ST 150 160 10 1 MF 150 160 11 1 ST 150 160 12 1 GK 130 150 13 1 DF 130 150 14 1 MF 130 150 15 1 ST 130 150 2 15 9 Like 10 2 13 Dislike 20 442 11 1 1 GK 150 160 2 1 DF 150 160 3 1 DF 150 160 4 1 DF 150 160 5 1 DF 150 160 6 1 MF 150 160 7 1 MF 150 160 8 1 MF 150 160 9 1 ST 150 160 10 1 MF 150 160 11 1 ST 150 160 0 433 Sample Output 1650 1760 Poor Manager!
 过桥的等待的一个问题，怎么使用C语言的程序的编写的过程的方式有效实现的做法
Problem Description You work at a military training facility in the jungles of San Motchi. One of the training exercises is to cross a series of rope bridges set high in the trees. Every bridge has a maximum capacity, which is the number of people that the bridge can support without breaking. The goal is to cross the bridges as quickly as possible, subject to the following tactical requirements: One unit at a time! If two or more people can cross a bridge at the same time (because they do not exceed the capacity), they do so as a unit; they walk as close together as possible, and they all take a step at the same time. It is never acceptable to have two different units on the same bridge at the same time, even if they don't exceed the capacity. Having multiple units on a bridge is not tactically sound, and multiple units can cause oscillations in the rope that slow everyone down. This rule applies even if a unit contains only a single person. Keep moving! When a bridge is free, as many people as possible begin to cross it as a unit. Note that this strategy doesn't always lead to an optimal overall crossing time (it may be faster for a group to wait for people behind them to catch up so that more people can cross at once). But it is not tactically sound for a group to wait, because the people they're waiting for might not make it, and then they've not only wasted time but endangered themselves as well. Periodically the bridges are reconfigured to give the trainees a different challenge. Given a bridge configuration, your job is to calculate the minimum amount of time it would take a group of people to cross all the bridges subject to these requirements. For example, suppose you have nine people who must cross two bridges: the first has capacity 3 and takes 10 seconds to cross; the second has capacity 4 and takes 60 seconds to cross. The initial state can be represented as (9 0 0), meaning that 9 people are waiting to cross the first bridge, no one is waiting to cross the second bridge, and no one has crossed the last bridge. At 10 seconds the state is (6 3 0). At 20 seconds the state is (3 3 /3:50/ 0), where /3:50/ means that a unit of three people is crossing the second bridge and has 50 seconds left. At 30 seconds the state is (0 6 /3:40/ 0); at 70 seconds it's (0 6 3); at 130 seconds it's (0 2 7); and at 190 seconds it's (0 0 9). Thus the total minimum time is 190 seconds. Input The input consists of one or more bridge configurations, followed by a line containing two zeros that signals the end of the input. Each bridge configuration begins with a line containing a negative integer –B and a positive integer P, where B is the number of bridges and P is the total number of people that must cross the bridges. Both B and P will be at most 20. (The reason for putting –B in the input file is to make the first line of a configuration stand out from the remaining lines.) Following are B lines, one for each bridge, listed in order from the first bridge that must be crossed to the last. Each bridge is defined by two positive integers C and T, where C is the capacity of the bridge (the maximum number of people the bridge can hold), and T is the time it takes to cross the bridge (in seconds). C will be at most 5, and T will be at most 100. Only one unit, of size at most C, can cross a bridge at a time; the time required is always T, regardless of the size of the unit (since they all move as one). The end of one bridge is always close to the beginning of the next, so the travel time between bridges is zero. Output For each bridge configuration, output one line containing the minimum amount of time it will take (in seconds) for all of the people to cross all of the bridges while meeting both tactical requirements. Sample Input 1 2 5 17 1 8 3 25 2 9 3 10 4 60 3 10 2 10 3 30 2 15 4 8 1 8 4 30 2 10 1 12 0 0 Sample Output 17 75 190 145 162
 连通图数据结构上面的一个路径的搜索的算法问题，采用C语言的程序的设计的办法
Problem Description Scofield is a hero in American show "Prison Break". He had broken the prison and started a big runaway. Scofield has a map of US with cities and bidirectional roads between them. The lengths of roads are known. Some cities get a lot of cops who are very troublesome. Now Scofield needs your help to arrange his runaway route. He needs a shortest path between two cities, while the quantity of the police in any city, except the start city and end city, on the route is no more than k. You should know that it is very hard to escape. Scofield is very smart but not good at computer. Now Scofield is in trouble, can you help him with your computer? Input The input consists of several test cases. There is an integer T on the first line indicating the number of test cases. For each case, the first line consists of two integers N and M. N is the number of cities; M is the number of roads. The next line contains N integers C1, C2... CN, where Ci is the number of cops in city i. Then followed M lines, each line consists of three integer, u, v, w, indicating there is a road with length w between city u and city v. The following line consists of an integer Q, indicating the number of queries. Each of the following Q lines consists of three integers, u, v, k, indicating the query for the shortest path between city u and city v with limitation of k cops. Technical Specification 1. T ≤ 20 2. 2 ≤ N ≤ 200, 0 ≤ M ≤ n * (n – 1) / 2 3. 0 ≤ Ci ≤ 1000,000,000 4. 0 ≤ u, v < N, 0 ≤ w ≤ 1000, 0 ≤ k ≤ 1000,000,000 5. 0 ≤ Q ≤ 100000 6. There is no more than ONE road between two cities and no road between the same cities. 7. For each query, u is not equal to v. 8. There is ONE empty line after each test case. Output For each query, output a single line contains the length of the shortest path. Output "1" if you can't find the path. Please output an empty line after each test case. Sample Input 1 4 4 100 2 3 100 0 1 1 0 2 1 1 3 2 2 3 3 2 0 3 2 0 3 1 Sample Output 3 1
 C++:关于输出的问题，如何使输出不为指数形式
``` #include<iostream> #include <iomanip> using namespace std; int main() { double p, n = 0, m = 0, i = 0, j = 1, x, q; double sum = 0; int z = 0; cin >> p; z = (int)p; x = p  z; while (z > 0) { m = z % 2; z = z / 2; sum = sum + m * pow(10, i); //n++;//记录整数部分位数 i++; } while (x > 0.000000001)//小数点后的精度,整数部分混为一体考虑 { q = (int)(x * 2); x = x * 2  q; sum += q * pow(10, j); j; n++;//总的位数 } if (n > 16)//double的有效数位16~17位 n = 16; //cout.precision(n);//设置输出精度 cout << "二进制为：" << setprecision(n) << sum << endl; } ``` 如果输入：68.3125 输出为：![图片说明](https://imgask.csdn.net/upload/202003/13/1584104744_246502.png) 如何让此处输出不表示为指数形式
 for(x=0，y=10;(y>8)&&(x<4);x++，y––); 这个语句执行了几次？
for(x=0，y=10;(y>8)&&(x<4);x++，y––); 这个语句执行了几次？我的答案是4次，而参考答案是3次，能不能解释一下问什么？
 路径的有效查找的算法问题，怎么使用C语言的程序编写程序的办法去加以实现的方式是什么
Problem Description Scofield is a hero in American show "Prison Break". He had broken the prison and started a big runaway. Scofield has a map of US with cities and bidirectional roads between them. The lengths of roads are known. Some cities get a lot of cops who are very troublesome. Now Scofield needs your help to arrange his runaway route. He needs a shortest path between two cities, while the quantity of the police in any city, except the start city and end city, on the route is no more than k. You should know that it is very hard to escape. Scofield is very smart but not good at computer. Now Scofield is in trouble, can you help him with your computer? Input The input consists of several test cases. There is an integer T on the first line indicating the number of test cases. For each case, the first line consists of two integers N and M. N is the number of cities; M is the number of roads. The next line contains N integers C1, C2... CN, where Ci is the number of cops in city i. Then followed M lines, each line consists of three integer, u, v, w, indicating there is a road with length w between city u and city v. The following line consists of an integer Q, indicating the number of queries. Each of the following Q lines consists of three integers, u, v, k, indicating the query for the shortest path between city u and city v with limitation of k cops. Technical Specification 1. T ≤ 20 2. 2 ≤ N ≤ 200, 0 ≤ M ≤ n * (n – 1) / 2 3. 0 ≤ Ci ≤ 1000,000,000 4. 0 ≤ u, v < N, 0 ≤ w ≤ 1000, 0 ≤ k ≤ 1000,000,000 5. 0 ≤ Q ≤ 100000 6. There is no more than ONE road between two cities and no road between the same cities. 7. For each query, u is not equal to v. 8. There is ONE empty line after each test case. Output For each query, output a single line contains the length of the shortest path. Output "1" if you can't find the path. Please output an empty line after each test case. Sample Input 1 4 4 100 2 3 100 0 1 1 0 2 1 1 3 2 2 3 3 2 0 3 2 0 3 1 Sample Output 3 1
 The jackpot，采用贪心算法如何计算，输入输出分行显示，采用C语言
Problem Description Bill has found the perfect way to make money playing the slot machines. After months of careful research, he has finally figured out the mechanics behind how the machines operate. Now he is ready to make profit of his findings. But first an introduction to the game. A slot machine consists of a number of wheels, usually three or four, each with a number of symbols printed on it – cherries, oranges, bells, etc. – and will show one of its symbols at a given time. To play, you insert a coin, push a button and the wheels start spinning. After spinning for a while, each wheel stops – at random it seems – at one of its symbols. If all wheels stop at the same symbol, or some nice combination of symbols, the player wins. One combination that is especially desirable is having the jackpot symbol on all wheels. This combination is simply called ’jackpot’ and will make you rich for life. What Bill has discovered is that each wheel will stop at the jackpot symbol with a certain periodicity, which differs a lot between wheels. He has also figured out (after some sneeking around at the slotmachine factory) that all newly manufactured slotmachines are delivered showing the jackpot combination, and that they all have a counter at the back, telling how many times the machine has been played. This counter is always set to zero at delivery. Now, all Bill needs to do is to calculate the number of times a machine has to be played between two occurrences of the jackpot combination. We will call this number the jackpot periodicity. This is of course the same as the number of times the machine has to be played after leaving the factory, before it gives its first jackpot. Thus, with a glance at the counter on the back of a machine, Bill can figure out if it is about to give a jackpot. As Bill knows that you are a skillful computer programmer, he turns to you with the problem of calculating the jackpot periodicity. For each machine, he will give you the number of wheels, and the periodicity with which the jackpot symbol shows up on each wheel. Input One line with the number of machines n <= 20. For each machine, one line with the number of wheels w <= 5, and one line with w numbers, p1,p2,....pw,the periodicity of each wheel pk<=1000. Output One line per machine: The jackpot periodicity of the machine, if it is less than or equal to a billion (10^9), otherwise output the text ’More than a billion.’. Sample Input 1 3 10 6 15 Sample Output 30
 C语言来实现 Bishops
Problem Description Yesterday was Sam's birthday. The most interesting gift was definitely the chessboard. Sam quickly learned the rules of chess and defeated his father, all his friends, his little sister, and now no one wants to play with him any more. So he decided to play with another birthday gift – a Book of Math Problems for Young Mathematicians. He opened the book somewhere in the middle and read the following problem: "How many knights can be placed on a chessboard without threatening each other?" After a while he realized that this was trivial and moved on to the next problem: "How many bishops can be placed on a chessboard without threatening each other?". Sam is in trouble here. He is not able to solve this problem and needs your help. Task Specification Sam's chessboard has size N×N. A bishop can move to any distance in any of the four diagonal directions. A bishop threatens another bishop if it can move to the other bishop's position. Your task is to compute the maximum number of bishops that can be placed on a chessboard in such a way that no two bishops threaten each other. Input The input file consists of several lines. The line number i contains a single number representing the size( <10^100) of the ith chessboard. Output The output file should contain the same number of lines as the input file. The ith line should contain one number – the maximum number of bishops that can be placed on ith chessboard without threatening each other. Sample Input 2 3 Sample Output 2 4
 函数scoresort要求按学生平均成绩从高到低排序成绩表，为什么冒泡法和选择法都无法正确排序是逻辑错误吗？
``` #include<stdio.h> #include<string.h> struct student { long int num; char name[8]; double score[3]; }; struct arrayst { struct student stu; double nums; }; int main() { void input(struct arrayst a[],int x); void output(struct arrayst arr[],int x); void scoresort(struct arrayst arr[],int x); arrayst a[100]; int n; while(1) { printf("请输入一个在5到100之间的数："); scanf("%d",&n); if(n>=5 && n<=100) break; } printf("NUM MAME SCORE1 SORE2 SCORE3\n"); input(a,n);//建立学生成绩表 printf("Before sort:\n"); printf("NUM MAME SCORE1 SORE2 SCORE3 AVERAGE\n"); output(a,n);//输出学生成绩表 scoresort(a,n);//按平均成绩从高到低排序学生成绩表 printf("After Sort:\n"); printf("NUM MAME SCORE1 SORE2 SCORE3 AVERAGE\n"); output(a,n);//输出学生成绩表 return 0; } void input(struct arrayst a[],int x) { int i; for(i=0;i<x;i++) { scanf("%d%s%lf%lf%lf",&a[i].stu.num,&a[i].stu.name,&a[i].stu.score[0],&a[i].stu.score[1],&a[i].stu.score[2]); } } void output(struct arrayst arr[],int x) { float aver; int i; for(i=0;i<x;i++) { aver=(arr[i].stu.score[0]+arr[i].stu.score[1]+arr[i].stu.score[2])/3.0; printf("%6d%7s%9.0lf%8.0lf%9.0lf%.4f\n",arr[i].stu.num,arr[i].stu.name,arr[i].stu.score[0],arr[i].stu.score[1],arr[i].stu.score[2],aver); } } void scoresort(struct arrayst arr[],int x) { float aver[100]; float temp; double te; char tem[20]; int i,j,k,r; for(i=0;i<x;i++) { aver[i]=(arr[i].stu.score[0]+arr[i].stu.score[1]+arr[i].stu.score[2])/3.0; } for(i=0;i<x1;i++) { k=i; for(j=i+1;j<x;j++) if(aver[j]>aver[k]) k=j; temp=arr[k].stu.num;arr[k].stu.num=arr[i].stu.num;arr[i].stu.num=temp; strcpy(tem,arr[k].stu.name);strcpy(arr[k].stu.name,arr[i].stu.name);strcpy(arr[i].stu.name,tem); for(r=0;r<3;r++) {te=arr[k].stu.score[r];arr[k].stu.score[r]=arr[i].stu.score[r];arr[i].stu.score[r]=te;} } } ``` ![图片说明](https://imgask.csdn.net/upload/201912/25/1577236212_585998.png) num为2的学生应该排最后一位，测试出来却在中间的位置，主函数是给定的不能变动。
 蜜蜂寻蜂巢的问题，要求使用C编程语言的工具如何才能通过编程实现代码的，如何解决的方式
Problem Description QQ the bear has found a little treasure – the bees’ secret honeypot, which is full of honey! He was happily eating his newfound treasure until suddenly one bee saw him and sounded the bee alarm. He knows that at this very moment hordes of bees will emerge from their hives and start spreading around trying to catch him. He knows he has to leave the honeypot and go home quickly, but the honey is so sweet that QQ doesn’t want to leave too soon. Help QQ determine the latest possible moment when he can leave. QQ’s forest is represented by a square grid of N by N unit cells, whose sides are parallel to the northsouth and eastwest directions. Each cell is occupied by a tree, by a patch of grass, by a hive or by QQ’s home. Two cells are considered adjacent if one of them is immediately to the north, south, east or west of the other (but not on a diagonal). QQ is a clumsy bear, so every time he makes a step, it has to be to an adjacent cell. QQ can only walk on grass and cannot go through trees or hives, and he can make at most S steps per minute. At the moment when the bee alarm is sounded, QQ is in the grassy cell containing the honeypot, and the bees are in every cell containing a hive (there may be more than one hive in the forest). During each minute from this time onwards, the following events happen in the following order: 1. If QQ is still eating honey, he decides whether to keep eating or to leave. If he continues eating, he does not move for the whole minute. Otherwise, he leaves immediately and takes up to S steps through the forest as described above. QQ cannot take any of the honey with him, so once he has moved he cannot eat honey again. 2. After QQ is done eating or moving for the whole minute, the bees spread one unit further across the grid, moving only into the grassy cells. Specifically, the swarm of bees spreads into every grassy cell that is adjacent to any cell already containing bees. Furthermore, once a cell contains bees it will always contain bees (that is, the swarm does not move, but it grows). In other words, the bees spread as follows: When the bee alarm is sounded, the bees only occupy the cells where the hives are located. At the end of the first minute, they occupy all grassy cells adjacent to hives (and still the hives themselves). At the end of the second minute, they additionally occupy all grassy cells adjacent to grassy cells adjacent to hives, and so on. Given enough time, the bees will end up simultaneously occupying all grassy cells in the forest that are within their reach. Neither QQ nor the bees can go outside the forest. Also, note that according to the rules above, QQ will always eat honey for an integer number of minutes. The bees catch QQ if at any point in time QQ finds himself in a cell occupied by bees. TASK Write a program that, given a map of the forest, determines the largest number of minutes that QQ can continue eating honey at his initial location, while still being able to get to his home before any of the bees catch him. CONSTRAINTS 1<=N<=800, the size (side length) of the map 1<=S<=1000, the maximum number of steps QQ can take in each minute Input The first line contains the integers N and S, separated by a space. The next N lines represent the map of the forest. Each of these lines contains N characters with each character representing one unit cell of the grid. The possible characters and their associated meanings are as follows: T denotes a tree G denotes a grassy cell M denotes the initial location of QQ and the honeypot, which is also a grassy cell D denotes the location of QQ’s home, which QQ can enter, but the bees cannot. H denotes the location of a hive NOTE: It is guaranteed that the map will contain exactly one letter M, exactly one letter D and at least one letter H. It is also guaranteed that there is a sequence of adjacent letters G that connects QQ to his home, as well as a sequence of adjacent letters G that connects at least one hive to the honeypot (i.e., to QQ’s initial location). These sequences might be as short as length zero, in case QQ’s home or a hive is adjacent to QQ’s initial location. Also, note that the bees cannot pass through or fly over QQ’s home. To them, it is just like a tree. Output output a single line containing a single integer: the maximum possible number of minutes that QQ can continue eating honey at his initial location, while still being able to get home safely. If QQ cannot possibly reach his home before the bees catch him, the number your program writes to standard output must be 1 instead. Sample Input 7 3 TTTTTTT TGGGGGT TGGGGGT MGGGGGD TGGGGGT TGGGGGT THHHHHT 7 3 TTTTTTT TGGGGGT TGGGGGT MGGGGGD TGGGGGT TGGGGGT TGHHGGT Sample Output 1 2
 path的寻找的计算，用的C语言的实现
Problem Description Scofield is a hero in American show "Prison Break". He had broken the prison and started a big runaway. Scofield has a map of US with cities and bidirectional roads between them. The lengths of roads are known. Some cities get a lot of cops who are very troublesome. Now Scofield needs your help to arrange his runaway route. He needs a shortest path between two cities, while the quantity of the police in any city, except the start city and end city, on the route is no more than k. You should know that it is very hard to escape. Scofield is very smart but not good at computer. Now Scofield is in trouble, can you help him with your computer? Input The input consists of several test cases. There is an integer T on the first line indicating the number of test cases. For each case, the first line consists of two integers N and M. N is the number of cities; M is the number of roads. The next line contains N integers C1, C2... CN, where Ci is the number of cops in city i. Then followed M lines, each line consists of three integer, u, v, w, indicating there is a road with length w between city u and city v. The following line consists of an integer Q, indicating the number of queries. Each of the following Q lines consists of three integers, u, v, k, indicating the query for the shortest path between city u and city v with limitation of k cops. Technical Specification 1. T ≤ 20 2. 2 ≤ N ≤ 200, 0 ≤ M ≤ n * (n – 1) / 2 3. 0 ≤ Ci ≤ 1000,000,000 4. 0 ≤ u, v < N, 0 ≤ w ≤ 1000, 0 ≤ k ≤ 1000,000,000 5. 0 ≤ Q ≤ 100000 6. There is no more than ONE road between two cities and no road between the same cities. 7. For each query, u is not equal to v. 8. There is ONE empty line after each test case. Output For each query, output a single line contains the length of the shortest path. Output "1" if you can't find the path. Please output an empty line after each test case. Sample Input 1 4 4 100 2 3 100 0 1 1 0 2 1 1 3 2 2 3 3 2 0 3 2 0 3 1 Sample Output 3 1
 寻找两条最接近的路径的算法问题，采用C语言程序设计的办法如何解决的呢？
Problem Description JFantasy has fallen in love with a beautiful girl (An ICPC volunteer?). Every afternoon, when the sun set, the girl comes out from her dorm, walks around the campus, and returns to her dorm. The girl’s walking path can be considered as a closed polyline. A closed polyline is a curve specified by a sequence of points (P1, P2, …, Pn) so that the curve consists of the line segments P1P2, P2P3, …, Pn1Pn, PnP1. Note that two line segments may intersect, coincide or partially coincide with each other. The points P1, P2, …, Pn are also called vertices of the polyline. While the girl is walking along the path, JFantasy is standing at some point which is not lying on the path. During the girl’s walking, the spoony boy rotates himself such that he can always see the girl directly in front of him. The boy may sometimes rotate counterclockwise, and sometimes rotate clockwise. If the boy stands at point P, let AP denote the total degrees the boy rotate counterclockwise, and BP denote the total degrees the boy rotate clockwise. It is not difficult to see that AP – BP is a multiple of 360, because when the girl finishes walking, the boy faces in the same direction as when the girl starts walking. We define the rotation number of P to be (AP – BP) / 360. LCQ is one of JFantasy’s G (G for good) friends. He has found JFantasy’s secret, and got an idea of making fun of him. He wants to put JFantasy at some point of which the rotation number is maximum given the walking path of the girl. To simplify the problem, we assume that the point where JFantasy can be put must be on a straight line. Formally, the problem can be stated as follows: Given the coordinates of (P1, P2, …, Pn), which specifies the girl’s walking path, you are asked to find the largest possible rotation number among all the points that are on the X axis, but not on the girl’s walking path. Input The input begins with a line containing an integer T (T<=100), which indicates the number of test cases. Each case begins with a line containing an integer N (2<=N<=1000), indicating the number of vertices of the girl’s walking path. The following N lines each contain two integers xi and yi (1000<= xi, yi <=1000), indicating the coordinates of the ith vertex Pi. Output For each case, output the largest possible rotation number in a line. Sample Input 3 2 1 2 2 1 6 1 1 2 1 2 1 3 1 3 0 1 0 5 1 1 1 0 1 1 0 1 0 1 Sample Output 0 0 2
 周期性的数组的预测的功能代码的实现，怎么利用C语言程序编写代码的技术方式去实现？
Problem Description Bill has found the perfect way to make money playing the slot machines. After months of careful research, he has finally figured out the mechanics behind how the machines operate. Now he is ready to make profit of his findings. But first an introduction to the game. A slot machine consists of a number of wheels, usually three or four, each with a number of symbols printed on it – cherries, oranges, bells, etc. – and will show one of its symbols at a given time. To play, you insert a coin, push a button and the wheels start spinning. After spinning for a while, each wheel stops – at random it seems – at one of its symbols. If all wheels stop at the same symbol, or some nice combination of symbols, the player wins. One combination that is especially desirable is having the jackpot symbol on all wheels. This combination is simply called ’jackpot’ and will make you rich for life. What Bill has discovered is that each wheel will stop at the jackpot symbol with a certain periodicity, which differs a lot between wheels. He has also figured out (after some sneeking around at the slotmachine factory) that all newly manufactured slotmachines are delivered showing the jackpot combination, and that they all have a counter at the back, telling how many times the machine has been played. This counter is always set to zero at delivery. Now, all Bill needs to do is to calculate the number of times a machine has to be played between two occurrences of the jackpot combination. We will call this number the jackpot periodicity. This is of course the same as the number of times the machine has to be played after leaving the factory, before it gives its first jackpot. Thus, with a glance at the counter on the back of a machine, Bill can figure out if it is about to give a jackpot. As Bill knows that you are a skillful computer programmer, he turns to you with the problem of calculating the jackpot periodicity. For each machine, he will give you the number of wheels, and the periodicity with which the jackpot symbol shows up on each wheel. Input One line with the number of machines n <= 20. For each machine, one line with the number of wheels w <= 5, and one line with w numbers, p1,p2,....pw,the periodicity of each wheel pk<=1000. Output One line per machine: The jackpot periodicity of the machine, if it is less than or equal to a billion (10^9), otherwise output the text ’More than a billion.’. Sample Input 1 3 10 6 15 Sample Output 30
 计算海豚出水的时间，怎么采用C语言的代码的设计的方式加以有效正确实现的
Problem Description Dolphins are marine mammals that are closely related to whales and porpoises. They might have some kind of the biggest brains in the water, but are dolphins really smart? Some scientists say that they use their big brains to stay warm in the sea, rather than for lots of thinking. Obviously those scientists don’t think dolphins are smart. We know that the brain is made up of two types of cells – neurons and glia. Neurons do the thinking, while glia do things like keeping the brain warm to help the neurons. After looking at how dolphins’ brains are put together, they claim that dolphins have lots of glia and not many neurons. In order to find out how smart the dolphins are, we throw one of them into a maze we've just created, to see how long it'll take the dolphin to get out. The maze consists of nodes and bidirectional edges connecting them. The dolphin needs power to swim, so we place exactly one fish at each node for him to enjoy. The dolphin is not interested in eating the same kind of fish more than once, but he can't resist any food if it's just in front to him! As a result, the dolphin decided to PLAN a route before going, so that it will not REACH any kind of fish more than once. Given the information above, can you tell me the minimum time that the dolphin needs to get out? Input The first line consists of an integer T, indicating the number of test cases. The first line of each case consists of four integers N, M, S and E, indicating the number of nodes, the number of edges, the starting node and destination. Each of the next M lines consists of three integers U, V, C, indicating that there is an edge with length C between node U and V. It will take a dolphin C time to pass this edge. The next line consists of N integers. Ki indicates the label of which kind fishes ith node has. Output Output the minimum time that a dolphin needs to get to the destination on a single line. If a dolphin can never get to the destination, please output 1. Constraints 0 < T <= 20 2 <= N <= 100; 0 <= M <= 10000; 0 <= S, E < N 0 <= U, V < N; 0 < C <= 1000 0 <= Ki < 1000 There may be more than one edge between two nodes, and may be loop, an edge that begins and ends both on the same vertex. All edges are bidirectional. Sample Input 2 2 1 0 1 0 1 1 0 0 4 4 0 3 0 1 1 1 3 1 0 2 2 2 3 2 0 0 1 2 Sample Output 1 4
 这道题目如何解决，请帮我解答一下，谢谢
【问题描述】 一个二元多项式f(x)=ax^2+bx+c (x为整数），给定a,b,c的值以及两个整数l，r，你的任务是求出x的取值分别为l,l+1,l+2......r1,r时该多项式的值。 【输入格式】 一行，5个整数，a,b,c,l,r 【输出格式】 1行，包含rl+1个数，第i个数表示x值为l+i1时多项式的值 【输入样例】 2 3 5 7 11 【输出样例】 124 157 194 235 280
 齿轮的周期性运动的计算的问题，怎么使用C语言的程序编写的代码的技术的方式有效地很好地实现的
Problem Description Bill has found the perfect way to make money playing the slot machines. After months of careful research, he has finally figured out the mechanics behind how the machines operate. Now he is ready to make profit of his findings. But first an introduction to the game. A slot machine consists of a number of wheels, usually three or four, each with a number of symbols printed on it – cherries, oranges, bells, etc. – and will show one of its symbols at a given time. To play, you insert a coin, push a button and the wheels start spinning. After spinning for a while, each wheel stops – at random it seems – at one of its symbols. If all wheels stop at the same symbol, or some nice combination of symbols, the player wins. One combination that is especially desirable is having the jackpot symbol on all wheels. This combination is simply called ’jackpot’ and will make you rich for life. What Bill has discovered is that each wheel will stop at the jackpot symbol with a certain periodicity, which differs a lot between wheels. He has also figured out (after some sneeking around at the slotmachine factory) that all newly manufactured slotmachines are delivered showing the jackpot combination, and that they all have a counter at the back, telling how many times the machine has been played. This counter is always set to zero at delivery. Now, all Bill needs to do is to calculate the number of times a machine has to be played between two occurrences of the jackpot combination. We will call this number the jackpot periodicity. This is of course the same as the number of times the machine has to be played after leaving the factory, before it gives its first jackpot. Thus, with a glance at the counter on the back of a machine, Bill can figure out if it is about to give a jackpot. As Bill knows that you are a skillful computer programmer, he turns to you with the problem of calculating the jackpot periodicity. For each machine, he will give you the number of wheels, and the periodicity with which the jackpot symbol shows up on each wheel. Input One line with the number of machines n <= 20. For each machine, one line with the number of wheels w <= 5, and one line with w numbers, p1,p2,....pw,the periodicity of each wheel pk<=1000. Output One line per machine: The jackpot periodicity of the machine, if it is less than or equal to a billion (10^9), otherwise output the text ’More than a billion.’. Sample Input 1 3 10 6 15 Sample Output 30
 在ROR中出现Access denied for user 'root'@'localhost'
Access denied for user 'root'@'localhost' (using password: YES) PS： OS:wins XP database.yml: development: adapter: mysql encoding: utf8 database: test_development username: root password: 0000 host: localhost test: adapter: mysql encoding: utf8 database: test_test username: root password: 0000 host: localhost production: adapter: mysql encoding: utf8 database: test_production username: root password: 0000 host: localhost 请大家帮帮看看是怎么回事呀？谢谢了~~ [b]问题补充：[/b] 在一个.rb文件里 require 'mysql' begin dbh = Mysql.real_connect("localhost", "root", "0000", "library",3306) ## 创建表，插入计录，查询计录 dbh.query("drop table if exists test_rb") dbh.query("create table test_rb(id int,name char(20))") dbh.query("insert into test_rb values(1,'张三'),(2,'李四')") printf "%d rows were inserted\n",dbh.affected_rows res = dbh.query("SELECT name FROM test_rb") puts "========\n" while row = res.fetch_row do printf "%s, %s\n", row[0], row[1] end puts "========\n" puts "Server version: " + dbh.get_server_info rescue Mysql::Error => e puts "Error code: #{e.errno}" puts "Error message: #{e.error}" puts "Error SQLSTATE: #{e.sqlstate}" if e.respond_to?("sqlstate") ensure dbh.close if dbh end 在dos下用命令的形式执行这个rb文件，是可以插入成功的： 2 rows were inserted ======== 张三, 李四, ======== Server version: 5.0.22communitynt 这是不是就说明ruby 和mysql是连上了呢？有点晕了~~ [b]问题补充：[/b] 我的平台是XP [b]问题补充：[/b] [quote]应该是密码不对了 development: database: test_development username: root password: 0000 host: localhost Access denied for user 'root'@'localhost' (using password: YES) 这俩处的不一样呀 [/quote] 我的mysql中的root密码就是0000呀，没有问题的呀。而且在用命令的形式插入数据库是可以成功的呀 [b]问题补充：[/b] [quote]mysql u root p0000 localhost[/quote] 在dos下执行这个命令是可以通过的 [b]问题补充：[/b] 这几天查了好多资料，终于有点成果了，今天重新在mysql中新建了一个用户dd,并分配给dd的这个库test_development 的权限，这回测试通过了，具体操作如下： 首先进入mysql的bin目录下： cd C:\Program Files\MySQL\MySQL Server 5.0\bin 在mysql中新建一个用户dd,分配给dd test_development 的权限 mysql –u root –p Enter password:**** 分配给用户dd权限： grant all on test_development .* to 'dd'@'localhost' identified by ''; 并用对database.yml文件时行修改 development: adapter: mysql encoding: utf8 database: test_development pool: 5 username: dd password: host: localhost 这样进行之后就可以得到相应的结果了，继续研究root用户为什么不可以。。。。 [b]问题补充：[/b] [quote]mysql u root p0000 h localhost 如何? mysql要對應hostname/IP與username Omnibus (中级程序员) 20090220 采纳为答案[/quote] 我在dos下执行这个命令是可以通过的：这是执行的结果： C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql u root p0000 h localhost Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 to server version: 5.0.22communitynt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. 是不是还要对mysql进行一些配置之后，root用户才能使用呀？ 谢谢了~~ [b]问题补充：[/b] 我把root的密码更改了一下，重新编译了一下，OK，通过了
 学Python后到底能干什么？网友：我太难了
感觉全世界营销文都在推Python，但是找不到工作的话，又有哪个机构会站出来给我推荐工作？ 笔者冷静分析多方数据，想跟大家说：关于超越老牌霸主Java，过去几年间Python一直都被寄予厚望。但是事实是虽然上升趋势，但是国内环境下，一时间是无法马上就超越Java的，也可以换句话说：超越Java只是时间问题罢。 太嚣张了会Python的人!找工作拿高薪这么简单？ https://edu....
 在中国程序员是青春饭吗？
今年，我也32了 ，为了不给大家误导，咨询了猎头、圈内好友，以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助，记得帮我点赞哦。 目录： 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时，拿着傲人的工资，想着好好干，以为我们的人生是这样的： 等真到了那一天，你会发现，你的人生很可能是这样的： ...
 为什么程序猿都不愿意去外包？
分享外包的组织架构，盈利模式，亲身经历，以及根据一些外包朋友的反馈，写了这篇文章 ，希望对正在找工作的老铁有所帮助
 Java校招入职华为，半年后我跑路了
何来 我，一个双非本科弟弟，有幸在 19 届的秋招中得到前东家华为（以下简称 hw）的赏识，当时秋招签订就业协议，说是入了某 java bg，之后一系列组织架构调整原因等等让人无法理解的神操作，最终毕业前夕，被通知调往其他 bg 做嵌入式开发（纯 C 语言）。 由于已至于校招末尾，之前拿到的其他 offer 又无法再收回，一时感到无力回天，只得默默接受。 毕业后，直接入职开始了嵌入式苦旅，由于从未...
 Java基础知识面试题（2020最新版）
文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性？原理是什么Java语言有哪些特点什么是字节码？采用字节码的最大好处是什么什么是Java程序的主类？应用程序和小程序的主类有何不同？Java应用程序与小程序之间有那些差别？Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...
 @程序员：GitHub这个项目快薅羊毛
今天下午在朋友圈看到很多人都在发github的羊毛，一时没明白是怎么回事。 后来上百度搜索了一下，原来真有这回事，毕竟资源主义的羊毛不少啊，1000刀刷爆了朋友圈！不知道你们的朋友圈有没有看到类似的消息。 这到底是啥情况？ 微软开发者平台GitHub 的一个区块链项目 Handshake ，搞了一个招募新会员的活动，面向GitHub 上前 25万名开发者派送 4,246.99 HNS币,大约价...
 用python打开电脑摄像头，并把图像传回qq邮箱【Pyinstaller打包】
前言: 如何悄悄的打开朋友的摄像头，看看她最近过的怎么样，嘿嘿！这次让我带你们来实现这个功能。 注： 这个程序仅限在朋友之间开玩笑，别去搞什么违法的事情哦。 代码 发送邮件 使用python内置的email模块即可完成。导入相应的代码封装为一个send函数，顺便导入需要导入的包 注： 下面的代码有三处要修改的地方，两处写的qq邮箱地址，还有一处写的qq邮箱授权码，不知道qq邮箱授权码的可以去百度一...
 做了5年运维，靠着这份监控知识体系，我从3K变成了40K
从来没讲过运维，因为我觉得运维这种东西不需要太多的知识面，然后我一个做了运维朋友告诉我大错特错，他就是从3K的运维一步步到40K的，甚至笑着说：我现在感觉自己什么都能做。 既然讲，就讲最重要的吧。 监控是整个运维乃至整个产品生命周期中最重要的一环，事前及时预警发现故障，事后提供详实的数据用于追查定位问题。目前业界有很多不错的开源产品可供选择。选择一款开源的监控系统，是一个省时省力、效率最高的方...
 C++(继承):19虚基类与虚继承（virtual）
一、菱形继承 在介绍虚继承之前介绍一下菱形继承 概念：A作为基类，B和C都继承与A。最后一个类D又继承于B和C，这样形式的继承称为菱形继承 菱形继承的缺点： 数据冗余：在D中会保存两份A的内容 访问不明确（二义性）：因为D不知道是以B为中介去访问A还是以C为中介去访问A，因此在访问某些成员的时候会发生二义性 缺点的解决： 数据冗余：通过下面“虚继承”技术来解决（见下） 访问...
 再不跳槽，应届毕业生拿的都比我多了！
跳槽几乎是每个人职业生涯的一部分，很多HR说“三年两跳”已经是一个跳槽频繁与否的阈值了，可为什么市面上有很多程序员不到一年就跳槽呢？他们不担心影响履历吗？ PayScale之前发布的**《员工最短任期公司排行榜》中，两家码农大厂Amazon和Google**，以1年和1.1年的员工任期中位数分列第二、第四名。 PayScale:员工最短任期公司排行榜 意外的是，任期中位数极小的这两家公司，薪资...
 我以为我学懂了数据结构，直到看了这个导图才发现，我错了
数据结构与算法思维导图
 技术大佬：我去，你写的 switch 语句也太老土了吧
昨天早上通过远程的方式 review 了两名新来同事的代码，大部分代码都写得很漂亮，严谨的同时注释也很到位，这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时，还是忍不住破口大骂：“我擦，小王，你丫写的 switch 语句也太老土了吧！” 来看看小王写的代码吧，看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...
 华为初面+综合面试（Java技术面）附上面试题
华为面试整体流程大致分为笔试，性格测试，面试，综合面试，回学校等结果。笔试来说，华为的难度较中等，选择题难度和网易腾讯差不多。最后的代码题，相比下来就简单很多，一共3道题目，前2题很容易就AC，题目已经记不太清楚，不过难度确实不大。最后一题最后提交的代码过了75%的样例，一直没有发现剩下的25%可能存在什么坑。 笔试部分太久远，我就不怎么回忆了。直接将面试。 面试 如果说腾讯的面试是挥金如土...
 和黑客斗争的 6 天！
互联网公司工作，很难避免不和黑客们打交道，我呆过的两家互联网公司，几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口，有的是寻找线上服务器可能存在的漏洞，大部分都...
 讲一个程序员如何副业月赚三万的真实故事
loonggg读完需要3分钟速读仅需 1 分钟大家好，我是你们的校长。我之前讲过，这年头，只要肯动脑，肯行动，程序员凭借自己的技术，赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...
 win10暴力查看wifi密码
刚才邻居打了个电话说：喂小灰，你家wifi的密码是多少，我怎么连不上了。 我。。。 我也忘了哎，就找到了一个好办法，分享给大家： 第一种情况：已经连接上的wifi，怎么知道密码？ 打开：控制面板\网络和 Internet\网络连接 然后右击wifi连接的无线网卡，选择状态 然后像下图一样： 第二种情况：前提是我不知道啊，但是我以前知道密码。 此时可以利用dos命令了 1、利用netsh wlan...
 上班一个月，后悔当初着急入职的选择了
最近有个老铁，告诉我说，上班一个月，后悔当初着急入职现在公司了。他之前在美图做手机研发，今年美图那边今年也有一波组织优化调整，他是其中一个，在协商离职后，当时捉急找工作上班，因为有房贷供着，不能没有收入来源。所以匆忙选了一家公司，实际上是一个大型外包公司，主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错，所以就立马入职去上班了。但是后面入职后，发现薪酬待遇这块并不是HR所说那样，那个HR自...
 女程序员，为什么比男程序员少？？？
昨天看到一档综艺节目，讨论了两个话题：（1）中国学生的数学成绩，平均下来看，会比国外好？为什么？（2）男生的数学成绩，平均下来看，会比女生好？为什么？同时，我又联想到了一个技术圈经常讨...
 总结了 150 余个神奇网站，你不来瞅瞅吗？
原博客再更新，可能就没了，之后将持续更新本篇博客。
 副业收入是我做程序媛的3倍，工作外的B面人生是怎样的？
提到“程序员”，多数人脑海里首先想到的大约是：为人木讷、薪水超高、工作枯燥…… 然而，当离开工作岗位，撕去层层标签，脱下“程序员”这身外套，有的人生动又有趣，马上展现出了完全不同的A/B面人生！ 不论是简单的爱好，还是正经的副业，他们都干得同样出色。偶尔，还能和程序员的特质结合，产生奇妙的“化学反应”。 @Charlotte：平日素颜示人，周末美妆博主 大家都以为程序媛也个个不修边幅，但我们也许...
 MySQL数据库面试题（2020最新版）
文章目录数据库基础知识为什么要使用数据库什么是SQL？什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式？分别有什么区别？数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别？InnoDB引擎的4大特性存储引擎选择索引什么是索引？索引有哪些优缺点？索引使用场景（重点）...
 女朋友过生日，我花了20分钟给她写了一个代理服务器
女朋友说：“看你最近挺辛苦的，我送你一个礼物吧。你看看想要什么，我来准备。” 我想了半天，从书到鞋子到电子产品最后到生活用品，感觉自己什么都不缺，然后和她说：“你省省钱吧，我什么都不需要。” 她坚持要送：“不行，你一定要说一个礼物，我想送你东西了。” 于是，我认真了起来，拿起手机，上淘宝逛了几分钟，但还是没能想出来缺点什么，最后实在没办法了：“这样吧，如果你实在想送东西，那你就写一个代理服务器吧”...
 记一次腾讯面试，我挂在了最熟悉不过的队列上……
腾讯后台面试，面试官问：如何自己实现队列？
 如果你是老板，你会不会踢了这样的员工？
有个好朋友ZS，是技术总监，昨天问我：“有一个老下属，跟了我很多年，做事勤勤恳恳，主动性也很好。但随着公司的发展，他的进步速度，跟不上团队的步伐了，有点...
 我入职阿里后，才知道原来简历这么写
私下里，有不少读者问我：“二哥，如何才能写出一份专业的技术简历呢？我总感觉自己写的简历太烂了，所以投了无数份，都石沉大海了。”说实话，我自己好多年没有写过简历了，但我认识的一个同行，他在阿里，给我说了一些他当年写简历的方法论，我感觉太牛逼了，实在是忍不住，就分享了出来，希望能够帮助到你。 01、简历的本质 作为简历的撰写者，你必须要搞清楚一点，简历的本质是什么，它就是为了来销售你的价值主张的。往深...
 程序员写出这样的代码，能不挨骂吗？
当你换槽填坑时，面对一个新的环境。能够快速熟练，上手实现业务需求是关键。但是，哪些因素会影响你快速上手呢？是原有代码写的不够好？还是注释写的不够好？昨夜...
 带了6个月的徒弟当了面试官，而身为高级工程师的我天天修Bug......
即将毕业的应届毕业生一枚，现在只拿到了两家offer，但最近听到一些消息，其中一个offer，我这个组据说客户很少，很有可能整组被裁掉。 想问大家： 如果我刚入职这个组就被裁了怎么办呢？ 大家都是什么时候知道自己要被裁了的？ 面试软技能指导: BQ/Project/Resume 试听内容： 除了刷题，还有哪些技能是拿到offer不可或缺的要素 如何提升面试软实力：简历, 行为面试，沟通能...
 !大部分程序员只会写3年代码
如果世界上都是这种不思进取的软件公司，那别说大部分程序员只会写 3 年代码，恐怕就没有程序员这种职业。
 离职半年了，老东家又发 offer，回不回？
有小伙伴问松哥这个问题，他在上海某公司，在离职了几个月后，前公司的领导联系到他，希望他能够返聘回去，他很纠结要不要回去？ 俗话说好马不吃回头草，但是这个小伙伴既然感到纠结了，我觉得至少说明了两个问题：1.曾经的公司还不错；2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说，松哥之前也有过类似的经历，今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点，就是离职了也没必要和老东家弄的苦...
 2020阿里全球数学大赛：3万名高手、4道题、2天2夜未交卷
阿里巴巴全球数学竞赛（ Alibaba Global Mathematics Competition）由马云发起，由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛，全世界爱好数学的人都可参与，不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...
 博客 在中国程序员是青春饭吗？
 博客 程序员请照顾好自己，周末病魔差点一套带走我。
 博客 我以为我学懂了数据结构，直到看了这个导图才发现，我错了
 博客 String s = new String(" a ") 到底产生几个对象？
 博客 技术大佬：我去，你写的 switch 语句也太老土了吧
 博客 Linux面试题（2020最新版）
 博客 将一个接口响应时间从2s优化到 200ms以内的一个案例
 博客 学历低，无法胜任工作，大佬告诉你应该怎么做
 博客 JVM内存结构和Java内存模型别再傻傻分不清了
 博客 和黑客斗争的 6 天！
 博客 Google 与微软的浏览器之争
 博客 讲一个程序员如何副业月赚三万的真实故事
 博客 上班一个月，后悔当初着急入职的选择了
 博客 女程序员，为什么比男程序员少？？？
 博客 搜狗输入法也在挑战国人的智商！
 博客 85后蒋凡：28岁实现财务自由、34岁成为阿里万亿电商帝国双掌门，他的人生底层逻辑是什么？...
 博客 总结了 150 余个神奇网站，你不来瞅瞅吗？
 博客 副业收入是我做程序媛的3倍，工作外的B面人生是怎样的？
 博客 MySQL数据库面试题（2020最新版）
 博客 如果你是老板，你会不会踢了这样的员工？
 博客 我入职阿里后，才知道原来简历这么写
 博客 离职半年了，老东家又发 offer，回不回？
 博客 男生更看重女生的身材脸蛋，还是思想？
 博客 什么时候跳槽，为什么离职，你想好了么？
 博客 程序员为什么千万不要瞎努力？
 博客 为什么程序员做外包会被瞧不起？
 博客 当HR压你价，说你只值7K，你该怎么回答？
 博客 面试：第十六章：Java中级开发（16k）
 博客 面试阿里p7，被按在地上摩擦，鬼知道我经历了什么？
 博客 终于懂了TCP和UDP协议区别