1. 2015浙江财经大学ACM有奖周赛(一) 题解报告
  2. 命题:丽丽&&黑鸡
  3.  
  4. 这是命题者原话。
  5. 题目涉及的知识面比较广泛,有深度优先搜索、广度优先搜索、数学题、几何题、贪心算法、枚举、二进制等等...
  6. 有些题目还需要大家对程序的效率做出优化..大一的小宝宝可能有一些吃不消..当成是一种体验就好了。
  7. 题解目录:
  8. ZUFE OJ 2307: 最长连续不下降子串
  9. ZUFE OJ 2308: Lucky Number
  10. ZUFE OJ 2309: 小明爱吃面
  11. ZUFE OJ 2310: 小明爱消除
  12. ZUFE OJ 2311: 找数字
  13. ZUFE OJ 2312: 简单数学题
  14. ZUFE OJ 2313: 字符串还原
  15. ZUFE OJ 2314: 矩形周长
  16. ZUFE OJ 2315: 小明的智力
  17. ZUFE OJ 2316: 水题
  18. ZUFE OJ 2317: 画个圈圈
  19. ZUFE OJ 2318: 跳格子
  20. ZUFE OJ 2320: 高中几何没学好
  21. ZUFE OJ 1606: 清洁公司
  22. ZUFE OJ 2323: 黑鸡跑1000
  1. /*
  2. ZUFE OJ 2307: 最长连续不下降子串
  3. 时间复杂度:o(n)
  4. 题解:输入a[1]到a[n]
  5. 补上a[0]为负无穷大,a[n+1]为无穷大
  6. 初始化k为1,ans为0
  7. 然后一个一个a[i]扫下去 (1<=i<=n+1)
  8. 如果a[i]<a[i-1],那么更新ans=max(ans,k);
  9. 否则k=k+1;
  10. 最后ans就是答案
  11. */
  12.  
  13. #include<cstdio>
  14. #include<cstring>
  15. #include<cmath>
  16. #include<queue>
  17. #include<algorithm>
  18. using namespace std;
  19.  
  20. const int maxn=+;
  21. const int INF=0x7FFFFFFF;
  22. int a[maxn],ans,k,n;
  23.  
  24. void init()
  25. {
  26. for(int i=; i<=n; i++) scanf("%d",&a[i]);
  27. a[]=INF;a[n+]=-INF;
  28. }
  29.  
  30. void slove()
  31. {
  32. while(~scanf("%d",&n))
  33. {
  34. init();
  35. ans=;
  36. k=;
  37. for(int i=; i<=n+; i++)
  38. {
  39. if(a[i]<a[i-])
  40. {
  41. ans=max(ans,k);
  42. k=;
  43. }
  44. else k++;
  45. }
  46. printf("%d\n",ans);
  47. }
  48. }
  49.  
  50. int main()
  51. {
  52. slove();
  53. return ;
  54. }
  1. /*
  2. ZUFE OJ 2308: Lucky Number
  3. 题解:设输入的n有x位,设Q等于10的x次方
  4. n*n最后的x位就是 (n*n)%Q
  5. 那么只要判断 (n*n)%Q 和 n 是否相等就可以了
  6. 要注意的一点就是 0<n<1e9
  7. n*n会超出int范围,所以用long long存储
  8. */
  9.  
  10. #include<cstdio>
  11. #include<cstring>
  12. #include<cmath>
  13. #include<queue>
  14. #include<algorithm>
  15. using namespace std;
  16.  
  17. long long n;
  18. long long _n;
  19. long long n2;
  20. int x;//n有x位
  21.  
  22. void slove()
  23. {
  24. while(~scanf("%lld",&n))
  25. {
  26. _n=n; x=;
  27. while(_n) x=x+, _n=_n/; //得到n有几位
  28. if((n*n)%((long long)pow(10.0,x))==n) printf("Yes\n");
  29. else printf("No\n");
  30. }
  31. }
  32.  
  33. int main()
  34. {
  35. slove();
  36. return ;
  37. }
  1. /*
  2. ZUFE OJ 2309: 小明爱吃面
  3. 时间复杂度:o(n)
  4. 题解:一个简单的贪心题
  5. 对于第i天,简单的说就是:是今天买,还是之前买?
  6. 当然是要选择从第1天到当前天,价格最小的那一天买下今天所需的粮食。
  7.  
  8. 今天吃的价格其实就是之前那些天中最小的价格
  9. 处理出每天的价格之后,求和即可。
  10.  
  11. PS:语文不好...描述的可能不是很清楚。
  12. */
  13.  
  14. #include<cstdio>
  15. #include<cstring>
  16. #include<cmath>
  17. #include<queue>
  18. #include<algorithm>
  19. using namespace std;
  20.  
  21. const int maxn=+;
  22. int a[maxn],p[maxn];
  23. int n,ans;
  24.  
  25. void init()
  26. {
  27. for(int i=;i<=n;i++)
  28. scanf("%d%d",&a[i],&p[i]);
  29. ans=;
  30. }
  31.  
  32. void slove()
  33. {
  34. while(~scanf("%d",&n))
  35. {
  36. init();
  37.  
  38. for(int i=;i<=n;i++)
  39. p[i]=min(p[i-],p[i]);//找出每一天的价格
  40.  
  41. for(int i=;i<=n;i++)
  42. ans=ans+a[i]*p[i];
  43.  
  44. printf("%d\n",ans);
  45. }
  46. }
  47.  
  48. int main()
  49. {
  50. slove();
  51. return ;
  52. }
  1. /*
  2. ZUFE OJ 2310: 小明爱消除
  3. 时间复杂度:o(n)
  4. 题解:此题属于脑洞题,需要细细咀嚼
  5. (描述起来比较费劲,略)
  6. */
  7.  
  8. #include<cstdio>
  9. #include<cstring>
  10. #include<cmath>
  11. #include<queue>
  12. #include<algorithm>
  13. using namespace std;
  14.  
  15. const int maxn=+;
  16. int tot[maxn*];
  17. int ans,n;
  18.  
  19. void init()
  20. {
  21. memset(tot,,sizeof tot);
  22. ans=;
  23. }
  24.  
  25. void slove()
  26. {
  27. while(~scanf("%d",&n))
  28. {
  29. init();
  30. for(int i=; i<=n; i++)
  31. {
  32. int x;
  33. scanf("%d",&x);
  34. tot[x]++;
  35. }
  36. int k=,m;
  37. while(k<*maxn)
  38. {
  39. m=tot[k]/;
  40. tot[k]=tot[k]%;
  41. tot[k+]=tot[k+]+m;
  42. k++;
  43. }
  44. for(int i=; i<*maxn; i++)
  45. ans=ans+tot[i];
  46. printf("%d\n",ans);
  47. }
  48. }
  49.  
  50. int main()
  51. {
  52. slove();
  53. return ;
  54. }
  1. /*
  2. ZUFE OJ 2311: 找数字
  3. 时间复杂度:o(n*n)
  4. 题解:开一个数组记录每个数字有几个
  5. tot[x]=y 代表x有y个!
  6. 然后两层循环枚举B和C
  7. 枚举到的时候 tot[B]--,tot[C]--;
  8. 然后验证tot[B+C]是否大于0,即A是否存在
  9. 大于零则表示存在。
  10. 否则不存在。
  11. */
  12.  
  13. #include<cstdio>
  14. #include<cstring>
  15. #include<cmath>
  16. #include<queue>
  17. #include<algorithm>
  18. using namespace std;
  19.  
  20. const int maxn=+;
  21. int tot[maxn],a[maxn];
  22. int n;
  23.  
  24. void slove()
  25. {
  26. while(~scanf("%d",&n))
  27. {
  28. memset(tot,,sizeof tot);
  29. for(int i=; i<=n; i++)
  30. {
  31. scanf("%d",&a[i]);
  32. tot[a[i]]++;
  33. }
  34. int ans=;
  35. for(int i=; i<=n; i++)
  36. {
  37. for(int j=i+; j<=n; j++)
  38. {
  39. tot[a[i]]--;
  40. tot[a[j]]--;
  41. if(tot[a[i]+a[j]]>)
  42. {
  43. ans=;
  44. break;
  45. }
  46. tot[a[i]]++;
  47. tot[a[j]]++;
  48. }
  49. if(ans==) break;
  50. }
  51. if(ans==) printf("NO\n");
  52. else printf("YES\n");
  53. }
  54. }
  55.  
  56. int main()
  57. {
  58. slove();
  59. return ;
  60. }
  1. /*
  2. ZUFE OJ 2312: 简单数学题
  3. 题解:数学题,a的b次方和c的d次方都很大,直接判断是做不出来的。
  4. 如果我们能找到一个函数F(x)是单调的,
  5. 而F(X)的值又比较好算,那么可以通过比较F(X)的大小来判断自变量的大小。
  6.  
  7. 令F(X)=log(X),a的b次方和c的d次方当做自变量。
  8. 那么接下来只要判断log(a的b次方)和log(c的d次方)的大小
  9. 就可以判断a的b次方和c的d次方的大小了。
  10.  
  11. 而log(a的b次方)=b*log(a),log(c的d次方)=d*log(c),很容易计算。
  12.  
  13. 判断相等的时候注意一下精度问题。
  14. */
  15.  
  16. #include<cstdio>
  17. #include<cstring>
  18. #include<cmath>
  19. #include<queue>
  20. #include<algorithm>
  21. using namespace std;
  22.  
  23. double a,b,c,d;
  24.  
  25. int main()
  26. {
  27. while(~scanf("%lf%lf%lf%lf",&a,&b,&c,&d))
  28. {
  29. double ans1=b*log(a);
  30. double ans2=d*log(c);
  31.  
  32. if(fabs(ans1-ans2)<0.000001) printf("=\n");
  33. else if(ans1>ans2) printf(">\n");
  34. else printf("<\n");
  35. }
  36. return ;
  37. }
  1. /*
  2. ZUFE OJ 2313: 字符串还原
  3. 时间复杂度:o(n)
  4. 题解:水题,搞之...
  5. */
  6.  
  7. #include<cstdio>
  8. #include<cstring>
  9. #include<cmath>
  10. #include<queue>
  11. #include<algorithm>
  12. using namespace std;
  13.  
  14. const int maxn=+;
  15. char s[maxn];
  16. int T;
  17.  
  18. void slove()
  19. {
  20. scanf("%d",&T);
  21. while(T--)
  22. {
  23. scanf("%s",s);
  24. int len=strlen(s);
  25. for(int i=;i<len;i++)
  26. if(i%==) printf("%c",s[i]);
  27. printf("\n");
  28.  
  29. for(int i=len-;i>=;i--)
  30. if(i%==) printf("%c",s[i]);
  31. printf("\n");
  32. }
  33. }
  34.  
  35. int main()
  36. {
  37. slove();
  38. return ;
  39. }
  1. /*
  2. ZUFE OJ 2314: 矩形周长
  3. 时间复杂度:o(sqrt(n))
  4. 题解:枚举一下边长就可以了
  5. */
  6.  
  7. #include<cstdio>
  8. #include<cstring>
  9. #include<cmath>
  10. #include<queue>
  11. #include<algorithm>
  12. using namespace std;
  13.  
  14. const int INF=0x7FFFFFFF;
  15. int T,n;
  16.  
  17. void slove()
  18. {
  19. scanf("%d",&T);
  20. while(T--)
  21. {
  22. scanf("%d",&n);
  23. int MaxL=sqrt(1.0*n);
  24. int ans=INF;
  25. for(int i=;i<=MaxL;i++)
  26. {
  27. if(n%i!=) continue;
  28. else
  29. {
  30. if(*(i+n/i)<ans)
  31. ans=*(i+n/i);
  32. }
  33. }
  34. printf("%d\n",ans);
  35. }
  36. }
  37.  
  38. int main()
  39. {
  40. slove();
  41. return ;
  42. }
  1. /*
  2. ZUFE OJ 2315: 小明的智力
  3. 时间复杂度:o(n)
  4. 题解:简单的贪心题
  5. 先排序,然后吃2,最后吃1
  6. 找到第一个比p大的位置
  7. 从这个位置开始吃2,吃完2 最后吃1
  8. */
  9.  
  10. #include<cstdio>
  11. #include<cstring>
  12. #include<cmath>
  13. #include<queue>
  14. #include<algorithm>
  15. using namespace std;
  16.  
  17. const int maxn=+;
  18. int a[maxn];
  19. bool flag[maxn];
  20. int T,n,p;
  21.  
  22. void slove()
  23. {
  24. scanf("%d",&T);
  25. while(T--)
  26. {
  27. memset(flag,,sizeof flag);
  28. scanf("%d%d",&n,&p);
  29. for(int i=;i<=n;i++)
  30. scanf("%d",&a[i]);
  31. sort(a+,a+n+);
  32. int now=n+;
  33. for(int i=;i<=n;i++)
  34. {
  35. if(a[i]>p)
  36. {
  37. now=i;
  38. break;
  39. }
  40. }
  41.  
  42. for(int i=now;i<=n;i++)
  43. if(a[i]>p)
  44. flag[i]=,p=p+;
  45.  
  46. for(int i=;i<=n;i++)
  47. if(flag[i]==) p=p+;
  48. printf("%d\n",p);
  49. }
  50. }
  51.  
  52. int main()
  53. {
  54. slove();
  55. return ;
  56. }
  1. /*
  2. ZUFE OJ 2316: 水题
  3. 时间复杂度:o(n)
  4. 题解:水题,搞之...
  5. */
  6.  
  7. #include<cstdio>
  8. #include<cstring>
  9. #include<cmath>
  10. #include<queue>
  11. #include<algorithm>
  12. using namespace std;
  13.  
  14. const int INF=0x7FFFFFFF;
  15. const int maxn=+;
  16. int T,ans,n;
  17. int a[maxn];
  18.  
  19. void slove()
  20. {
  21. scanf("%d",&T);
  22. while(T--)
  23. {
  24. ans=-INF;
  25. scanf("%d",&n);
  26. for(int i=;i<=n;i++) scanf("%d",&a[i]);
  27. for(int i=;i<=n;i++)
  28. if(a[i]-a[i-]>ans)
  29. ans=a[i]-a[i-];
  30. printf("%d\n",ans);
  31. }
  32. }
  33.  
  34. int main()
  35. {
  36. slove();
  37. return ;
  38. }
  1. /*
  2. ZUFE OJ 2317:画个圈圈
  3. */
  4. #include<stdio.h>
  5. #include<math.h>
  6. #include<map>
  7. #include<algorithm>
  8. #include<string.h>
  9. using namespace std;
  10.  
  11. const int maxn=+;
  12. int ans,N,M;
  13. char Map[maxn][maxn];
  14. bool flag[maxn][maxn];
  15. char sign;
  16. int dir[][]= {{-,},{,},{,-},{,}};
  17.  
  18. void init()
  19. {
  20. memset(flag,,sizeof flag);
  21. ans=;
  22. }
  23.  
  24. void dfs(int x,int y,int Dir)
  25. {
  26. if(flag[x][y]==&&Dir!=-)
  27. {
  28. ans=;
  29. return;
  30. }
  31. flag[x][y]=;
  32. for(int i=; i<; i++)
  33. {
  34. int NewX=x+dir[i][];
  35. int NewY=y+dir[i][];
  36.  
  37. if(Dir==&&i==) continue;
  38. if(Dir==&&i==) continue;
  39. if(Dir==&&i==) continue;
  40. if(Dir==&&i==) continue;
  41. if(Map[NewX][NewY]!=sign) continue;
  42. if(NewX<||NewX>=N) continue;
  43. if(NewY<||NewY>=M) continue;
  44.  
  45. dfs(NewX,NewY,i);
  46. if(ans) return;
  47. }
  48. }
  49.  
  50. void slove()
  51. {
  52. while(~scanf("%d%d",&N,&M))
  53. {
  54. for(int i=; i<N; i++)
  55. scanf("%s",Map[i]);
  56. init();
  57. for(int i=; i<N; i++)
  58. {
  59. for(int j=; j<M; j++)
  60. {
  61. sign=Map[i][j];
  62. memset(flag,,sizeof flag);
  63. dfs(i,j,-);
  64. if(ans) break;
  65. }
  66. if(ans) break;
  67. }
  68. if(ans==) printf("Yes\n");
  69. else printf("No\n");
  70. }
  71. }
  72.  
  73. int main()
  74. {
  75. slove();
  76. return ;
  77. }
  1. /*
  2. ZUFE OJ 2318: 跳格子
  3. 时间复杂度:不会算
  4. 题解:BFS
  5. */
  6.  
  7. #include<cstdio>
  8. #include<cstring>
  9. #include<cmath>
  10. #include<algorithm>
  11. #include<queue>
  12. using namespace std;
  13.  
  14. const int INF=0x7FFFFFFF;
  15. int dir[][]={{-,},{,},{,-},{,}};
  16. const int maxn=+;
  17. int N,M,ans;
  18. int Sx,Sy,Ex,Ey;
  19. int Map[maxn][maxn];
  20. int flag[maxn][maxn];
  21. struct Point
  22. {
  23. int x,y;
  24. int tot;
  25. };
  26. queue<Point>Q;
  27.  
  28. void BFS()
  29. {
  30. while(!Q.empty()) Q.pop();
  31. for(int i=;i<maxn;i++)
  32. for(int j=;j<maxn;j++)
  33. flag[i][j]=INF;
  34. Point p;
  35. p.x=Sx; p.y=Sy; p.tot=;
  36. Q.push(p);
  37. ans=-;
  38. flag[Sx][Sy]=;
  39. while(!Q.empty())
  40. {
  41. Point h=Q.front(); Q.pop();
  42. if(h.x==Ex&&h.y==Ey)
  43. {
  44. ans=h.tot;
  45. break;
  46. }
  47. for(int i=;i<;i++)
  48. {
  49. int NewX=h.x+dir[i][];
  50. int NewY=h.y+dir[i][];
  51.  
  52. if(NewX>=&&NewX<=N)
  53. {
  54. if(NewY>=&&NewY<=M)
  55. {
  56. if(Map[NewX][NewY]!=)
  57. {
  58. if(flag[NewX][NewY]>h.tot+)
  59. {
  60. flag[NewX][NewY]=h.tot+;
  61. Point x;
  62. x.x=NewX;
  63. x.y=NewY;
  64. x.tot=h.tot+;
  65. Q.push(x);
  66. }
  67. }
  68. }
  69. }
  70. }
  71. }
  72. printf("%d\n",ans);
  73. }
  74.  
  75. void slove()
  76. {
  77. while(~scanf("%d%d",&N,&M))
  78. {
  79. for(int i=;i<=N;i++)
  80. for(int j=;j<=M;j++)
  81. scanf("%d",&Map[i][j]);
  82.  
  83. for(int i=;i<=N;i++)
  84. for(int j=;j<=M;j++)
  85. {
  86. if(Map[i][j]==) Sx=i,Sy=j;
  87. if(Map[i][j]==) Ex=i,Ey=j;
  88. }
  89.  
  90. BFS();
  91. }
  92. }
  93.  
  94. int main()
  95. {
  96. slove();
  97. return ;
  98. }
  1. /*
  2. ZUFE OJ 2320: 高中几何没学好
  3. 时间复杂度:o(1)
  4. 题解:连接AX
  5. 设三角形AFX面积为e,三角形AXE面积为f
  6. 得到三个方程
  7. e+f=d
  8. f/c=(a+d)/(b+c)
  9. e/a=(c+d)/(a+b)
  10. 三个未知量都可以解出来
  11. */
  12. #include<cstdio>
  13. #include<cstring>
  14. #include<cmath>
  15. #include<algorithm>
  16. using namespace std;
  17.  
  18. double a,b,c,k;
  19. double e,f;
  20.  
  21. int main()
  22. {
  23. while(~scanf("%lf%lf%lf",&a,&b,&c))
  24. {
  25. k=(a+b)/(b+c);
  26. f=(a*c)/(b-c*k);
  27. e=k*f;
  28. printf("%.4lf\n",e+f);
  29. }
  30. return ;
  31. }
  1. /*
  2. ZUFE OJ 1606: 清洁公司
  3. 题解:DFS求连通块
  4. */
  5. #include<stdio.h>
  6.  
  7. char gird[][];
  8. int m,n;
  9. int dir[][]= {{-,-},{-,},{-,},{,}
  10. ,{,},{,},{,-},{,-}};
  11.  
  12. void dfs(int x,int y)
  13. {
  14. int i,xx,yy;
  15. gird[x][y]='#';
  16. for(i=; i<; i++)
  17. {
  18. xx=x+dir[i][];
  19. yy=y+dir[i][];
  20. if(xx<||yy<||xx>=m||yy>=n) continue;
  21. if(gird[xx][yy]=='@') dfs(xx,yy);
  22. }
  23. }
  24. int main()
  25. {
  26. int i,j;
  27. int count;
  28. while( scanf("%d%d",&m,&n)!=EOF)
  29. {
  30. for(i=; i<m; i++) scanf("%s",gird[i]);
  31. count=;
  32. for(i=; i<m; i++)
  33. {
  34. for(j=; j<n; j++)
  35. {
  36. if(gird[i][j]=='@')
  37. {
  38. dfs(i,j);
  39. count++;
  40. }
  41. }
  42. }
  43. printf("%d\n",count);
  44. }
  45. return ;
  46. }
  1. /*
  2. ZUFE OJ 2323: 黑鸡跑1000
  3. 题解:水题..搞之..
  4. */
  5. #include <stdio.h>
  6.  
  7. double a,b;
  8.  
  9. int main()
  10. {
  11. while(~scanf("%lf%lf",&a,&b))
  12. printf("%.2lf\n",500.0/a+500.0/b);
  13. return ;
  14. }

2015浙江财经大学ACM有奖周赛(一) 题解报告的更多相关文章

  1. 第十四届浙江财经大学程序设计竞赛重现赛--A-A Sad Story

    链接:https://www.nowcoder.com/acm/contest/89/A 来源:牛客网 1.题目描述 The Great Wall story of Meng Jiangnv’s Bi ...

  2. 2015广东工业大学ACM学校巡回赛 I 游戏高手 (如压力dp)

    Problem I: 游戏王 Description 小学的时候,Stubird很喜欢玩游戏王.有一天,他发现了一个绝佳的连锁组合,这个连锁组合须要6张卡. 但是他一张都没有,但是他的那些朋友们有.只 ...

  3. 浙江财经大学第十五届大学生程序设计竞赛------B 烦恼先生打麻将

    问题 B: B - 烦恼先生打麻将 时间限制: 1 Sec  内存限制: 256 MB提交: 8  解决: 5[提交][状态][讨论版] 题目描述 输入 6 6 Z D 1S 1S 9W 5W 2S ...

  4. 第13届景驰-埃森哲杯广东工业大学ACM程序设计大赛部分题解

    A 跳台阶 思路:其实很简单,不过当时直接dp来做了 AC代码: #define _CRT_SECURE_NO_DEPRECATE #include<iostream> #include& ...

  5. 第13届 广东工业大学ACM程序设计大赛 C题 平分游戏

    第13届 广东工业大学ACM程序设计大赛 C题 平分游戏 题目描述 转眼间又过了一年,又有一届的师兄师姐要毕业了. ​ 有些师兄师姐就去了景驰科技实习. 在景驰,员工是他们最宝贵的财富.只有把每一个人 ...

  6. 第13届景驰-埃森哲杯广东工业大学ACM程序设计大赛--D-psd面试

    链接:https://www.nowcoder.com/acm/contest/90/D 来源:牛客网 1.题目描述 掌握未来命运的女神 psd 师兄在拿了朝田诗乃的 buff 后决定去实习. 埃森哲 ...

  7. 第13届景驰-埃森哲杯广东工业大学ACM程序设计大赛

    拖了好久了 链接:https://www.nowcoder.com/acm/contest/90/A来源:牛客网 跳台阶 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K, ...

  8. 哈尔滨工程大学ACM预热赛(A,C,H,I)

    A: 链接:https://ac.nowcoder.com/acm/contest/554/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言655 ...

  9. 哈尔滨工程大学ACM预热赛

    https://ac.nowcoder.com/acm/contest/554#question A #include <bits/stdc++.h> using namespace st ...

随机推荐

  1. Table隔行变色的JavaScript代码

    <table id="datatable"> <tr> <td>脚本之家</td> </tr> <tr> & ...

  2. JS总结之一:字符串的调用方法

    字符串的调用方法:var s="hello, world";document.write(s.charAt(0)); //第一个字符document.write(s.charAt( ...

  3. 期刊:DOI :10.3969/j.issn.1001-2400.2012.01.008

    DOI:10.3969/j.issn.1001-2400.2012.01.008 “/” 分为前缀和后缀两部分中间用一斜杠分开,前缀中又以小圆点分为两部分. "DOI":一篇期刊论 ...

  4. Ubuntu 14.04 Nvidia显卡驱动手动安装及设置

      更换主板修复grub 引导后,无法从Nvidia进入系统(光标闪烁), 可能是显卡驱动出了问题. 1. 进入BIOS设置, 从集成显卡进入系统 将显示器连接到集显的VGI口, 并在BIOS中设置用 ...

  5. 避免IE执行AJAX时,返回JSON出现下载文件

    <bean id="mappingJacksonHttpMessageConverter" class="org.springframework.http.conv ...

  6. 控制器view的加载顺序initWithNibName >>> viewDidLoad >>> viewWillAppear >>> viewDidAppear

    -(void)viewWillAppear:(BOOL)animated { self.navigationController.navigationBarHidden=NO;// 邓超界:放在wil ...

  7. runtime——消息机制

    本文授权转载,作者:Sindri的小巢(简书) 从异常说起 我们都知道,在iOS中存在这么一个通用类类型id,它可以用来表示任何对象的类型 —— 这意味着我们使用id类型的对象调用任何一个方法,编译器 ...

  8. UML类图图示样例

    下图来自<大话设计模式>一书:

  9. cannot create windows service for mysql

    这安装完mysql启动的时候总是弹出不能启动错误,解决办法: 先卸载掉MySQL干净:把关于MySQL所有目录及文件都删除掉,还有把注册表删除干净.在注册表找到以下项目并删除:HKEY_LOCAL_M ...

  10. CodeForces 510B DFS水题

    题目大意:在图中找到一个字符可以围成一个环(至少有环四个相同元素) 题目思路:对当前点进行搜索,如果发现可以达到某个已经被查找过的点,且当前点不是由这个点而来,则查找成功. #include<c ...