Problem A. Two distinct points

[题解]

显然 , 当l1不等于r2时 , (l1 , r2)是一组解

否则 , (l1 , l2)是一组合法的解

时间复杂度 : O(1)

[代码]

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. typedef long long ll;
  4. typedef long double ld;
  5. typedef unsigned long long ull;
  6.  
  7. template <typename T> inline void chkmax(T &x,T y) { x = max(x,y); }
  8. template <typename T> inline void chkmin(T &x,T y) { x = min(x,y); }
  9. template <typename T> inline void read(T &x)
  10. {
  11. T f = ; x = ;
  12. char c = getchar();
  13. for (; !isdigit(c); c = getchar()) if (c == '-') f = -f;
  14. for (; isdigit(c); c = getchar()) x = (x << ) + (x << ) + c - '';
  15. x *= f;
  16. }
  17. int main()
  18. {
  19.  
  20. int T;
  21. read(T);
  22. while (T--)
  23. {
  24. int l1 , r1 , l2 , r2;
  25. read(l1); read(r1); read(l2); read(r2);
  26. if (l1 != r2) cout<< l1 << ' ' << r2 << '\n';
  27. else cout<< l1 << ' ' << l2 << '\n';
  28. }
  29. return ;
  30.  
  31. }

Problem B. Divisors of Two Integers

[题解]

首先 , 给定序列中的最大数一定是x和y中的一个数

将该数的所有因子从序列中删除一次 , 剩余数中的最大数即为另一个数

时间复杂度 : O(M) (取M = 10 ^ 4)

[代码]

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define MAXN 10010
  4. typedef long long ll;
  5. typedef long double ld;
  6. typedef unsigned long long ull;
  7.  
  8. int n;
  9. int d[MAXN] , cnt[MAXN];
  10.  
  11. template <typename T> inline void chkmax(T &x,T y) { x = max(x,y); }
  12. template <typename T> inline void chkmin(T &x,T y) { x = min(x,y); }
  13. template <typename T> inline void read(T &x)
  14. {
  15. T f = ; x = ;
  16. char c = getchar();
  17. for (; !isdigit(c); c = getchar()) if (c == '-') f = -f;
  18. for (; isdigit(c); c = getchar()) x = (x << ) + (x << ) + c - '';
  19. x *= f;
  20. }
  21. int main()
  22. {
  23.  
  24. read(n);
  25. int fst = , sec = ;
  26. for (int i = ; i <= n; i++)
  27. {
  28. read(d[i]);
  29. if (d[i] > fst) fst = d[i];
  30. ++cnt[d[i]];
  31. }
  32. for (int i = ; i <= fst; i++)
  33. if (fst % i == ) --cnt[i];
  34. for (int i = (int)1e4; i >= ; i--)
  35. {
  36. if (cnt[i])
  37. {
  38. sec = i;
  39. break;
  40. }
  41. }
  42. cout<< fst << ' ' << sec << '\n';
  43.  
  44. return ;
  45.  
  46. }

Problem C. Nice Garland

[题解]

通过观察发现 , 答案一定是一个以"R" , "G" , "B"三个字符所形成的一个排列为循环节循环得到的字符串

枚举排列 , 计算最优解 , 即可

时间复杂度 : O(N)

[代码]

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. const int MAXN = 2e5 + ;
  4. const int inf = 1e9;
  5. typedef long long ll;
  6. typedef long double ld;
  7. typedef unsigned long long ull;
  8.  
  9. int n;
  10. char s[MAXN] , t1[MAXN] , t2[MAXN] , t3[MAXN] , t4[MAXN] , t5[MAXN] , t6[MAXN];
  11.  
  12. template <typename T> inline void chkmax(T &x,T y) { x = max(x,y); }
  13. template <typename T> inline void chkmin(T &x,T y) { x = min(x,y); }
  14. template <typename T> inline void read(T &x)
  15. {
  16. T f = ; x = ;
  17. char c = getchar();
  18. for (; !isdigit(c); c = getchar()) if (c == '-') f = -f;
  19. for (; isdigit(c); c = getchar()) x = (x << ) + (x << ) + c - '';
  20. x *= f;
  21. }
  22. int main()
  23. {
  24.  
  25. scanf("%d" , &n);
  26. scanf("%s" , s + );
  27. for (int i = ; i <= n; i++)
  28. {
  29. if (i % == ) t1[i] = 'R';
  30. if (i % == ) t1[i] = 'G';
  31. if (i % == ) t1[i] = 'B';
  32. }
  33. int stp = , ans = , mstp = inf;
  34. for (int i = ; i <= n; i++)
  35. if (s[i] != t1[i]) ++stp;
  36. if (stp < mstp)
  37. {
  38. mstp = stp;
  39. ans = ;
  40. }
  41.  
  42. for (int i = ; i <= n; i++)
  43. {
  44. if (i % == ) t2[i] = 'R';
  45. if (i % == ) t2[i] = 'B';
  46. if (i % == ) t2[i] = 'G';
  47. }
  48. stp = ;
  49. for (int i = ; i <= n; i++)
  50. if (s[i] != t2[i]) ++stp;
  51. if (stp < mstp)
  52. {
  53. mstp = stp;
  54. ans = ;
  55. }
  56.  
  57. for (int i = ; i <= n; i++)
  58. {
  59. if (i % == ) t3[i] = 'B';
  60. if (i % == ) t3[i] = 'R';
  61. if (i % == ) t3[i] = 'G';
  62. }
  63. stp = ;
  64. for (int i = ; i <= n; i++)
  65. if (s[i] != t3[i]) ++stp;
  66. if (stp < mstp)
  67. {
  68. mstp = stp;
  69. ans = ;
  70. }
  71.  
  72. for (int i = ; i <= n; i++)
  73. {
  74. if (i % == ) t4[i] = 'B';
  75. if (i % == ) t4[i] = 'G';
  76. if (i % == ) t4[i] = 'R';
  77. }
  78. stp = ;
  79. for (int i = ; i <= n; i++)
  80. if (s[i] != t4[i]) ++stp;
  81. if (stp < mstp)
  82. {
  83. mstp = stp;
  84. ans = ;
  85. }
  86.  
  87. for (int i = ; i <= n; i++)
  88. {
  89. if (i % == ) t5[i] = 'G';
  90. if (i % == ) t5[i] = 'R';
  91. if (i % == ) t5[i] = 'B';
  92. }
  93. stp = ;
  94. for (int i = ; i <= n; i++)
  95. if (s[i] != t5[i]) ++stp;
  96. if (stp < mstp)
  97. {
  98. mstp = stp;
  99. ans = ;
  100. }
  101.  
  102. for (int i = ; i <= n; i++)
  103. {
  104. if (i % == ) t6[i] = 'G';
  105. if (i % == ) t6[i] = 'B';
  106. if (i % == ) t6[i] = 'R';
  107. }
  108. stp = ;
  109. for (int i = ; i <= n; i++)
  110. if (s[i] != t6[i]) ++stp;
  111. if (stp < mstp)
  112. {
  113. mstp = stp;
  114. ans = ;
  115. }
  116.  
  117. cout<< mstp << '\n';
  118. if (ans == )
  119. {
  120. for (int i = ; i <= n; i++) putchar(t1[i]);
  121. cout<< '\n';
  122. }
  123. if (ans == )
  124. {
  125. for (int i = ; i <= n; i++) putchar(t2[i]);
  126. cout<< '\n';
  127. }
  128. if (ans == )
  129. {
  130. for (int i = ; i <= n; i++) putchar(t3[i]);
  131. cout<< '\n';
  132. }
  133. if (ans == )
  134. {
  135. for (int i = ; i <= n; i++) putchar(t4[i]);
  136. cout<< '\n';
  137. }
  138. if (ans == )
  139. {
  140. for (int i = ; i <= n; i++) putchar(t5[i]);
  141. cout<< '\n';
  142. }
  143. if (ans == )
  144. {
  145. for (int i = ; i <= n; i++) putchar(t6[i]);
  146. cout<< '\n';
  147. }
  148.  
  149. return ;
  150.  
  151. }

Problem D.  Diverse Garland

[题解]

简单贪心即可

时间复杂度 : O(N)

[代码]

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. const int MAXN = 2e5 + ;
  4. typedef long long ll;
  5. typedef long double ld;
  6. typedef unsigned long long ull;
  7.  
  8. int n , cnt;
  9. char s[MAXN];
  10.  
  11. template <typename T> inline void chkmax(T &x,T y) { x = max(x,y); }
  12. template <typename T> inline void chkmin(T &x,T y) { x = min(x,y); }
  13. template <typename T> inline void read(T &x)
  14. {
  15. T f = ; x = ;
  16. char c = getchar();
  17. for (; !isdigit(c); c = getchar()) if (c == '-') f = -f;
  18. for (; isdigit(c); c = getchar()) x = (x << ) + (x << ) + c - '';
  19. x *= f;
  20. }
  21. int main()
  22. {
  23.  
  24. scanf("%d" , &n);
  25. scanf("%s" , s + );
  26. map<char , int> mp;
  27. mp.clear();
  28. for (int i = ; i < n; i++)
  29. {
  30. if (s[i] != s[i - ]) continue;
  31. mp.clear();
  32. mp[s[i - ]]++; mp[s[i + ]]++;
  33. if (mp['R'] && mp['G'])
  34. {
  35. s[i] = 'B';
  36. ++cnt;
  37. } else if (mp['R'] && mp['B'])
  38. {
  39. s[i] = 'G';
  40. ++cnt;
  41. } else if (mp['B'] && mp['G'])
  42. {
  43. s[i] = 'R';
  44. ++cnt;
  45. } else if (mp['R'])
  46. {
  47. s[i] = 'G';
  48. ++cnt;
  49. } else if (mp['G'])
  50. {
  51. s[i] = 'B';
  52. ++cnt;
  53. } else
  54. {
  55. s[i] = 'R';
  56. ++cnt;
  57. }
  58. }
  59. if (s[n] == s[n - ])
  60. {
  61.   

int i = n;
          mp.clear();
          ++mp[s[n - 1]];
          if (mp['R'])
          {
             s[i] = 'G';
             ++cnt;
          } else if (mp['G'])
          {
              s[i] = 'B';
              ++cnt;
          } else
          {
         s[i] = 'R';
         ++cnt;
         }

}

  1. cout<< cnt << '\n';
  2. for (int i = ; i <= n; i++) putchar(s[i]);
  3. printf("\n");
  4.  
  5. return ;
  6.  
  7. }

Problem E. Array and Segments

[题解]

       Easy Version :

       枚举序列中的最大值和最小值的出现位置 , 然后枚举每一条线段 , 贪心地选择所有覆盖了最小值出现位置的线段

时间复杂度 : O(N ^ 2M)

[代码]

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define MAXN 310
  4. typedef long long ll;
  5. typedef long double ld;
  6. typedef unsigned long long ull;
  7.  
  8. int n , m , ans;
  9. int a[MAXN] , l[MAXN] , r[MAXN];
  10. vector< int > fans;
  11.  
  12. template <typename T> inline void chkmax(T &x,T y) { x = max(x,y); }
  13. template <typename T> inline void chkmin(T &x,T y) { x = min(x,y); }
  14. template <typename T> inline void read(T &x)
  15. {
  16. T f = ; x = ;
  17. char c = getchar();
  18. for (; !isdigit(c); c = getchar()) if (c == '-') f = -f;
  19. for (; isdigit(c); c = getchar()) x = (x << ) + (x << ) + c - '';
  20. x *= f;
  21. }
  22. inline void solve(int x , int y)
  23. {
  24. int tx = a[x] , ty = a[y];
  25. vector< int > res;
  26. res.clear();
  27. for (int i = ; i <= m; i++)
  28. {
  29. if (l[i] <= x && r[i] >= x) continue;
  30. if (l[i] <= y && r[i] >= y)
  31. {
  32. res.push_back(i);
  33. --ty;
  34. }
  35. }
  36. if (tx - ty > ans)
  37. {
  38. ans = tx - ty;
  39. fans.clear();
  40. for (unsigned i = ; i < res.size(); i++) fans.push_back(res[i]);
  41. }
  42. }
  43.  
  44. int main()
  45. {
  46.  
  47. read(n); read(m);
  48. for (int i = ; i <= n; i++) read(a[i]);
  49. for (int i = ; i <= m; i++)
  50. {
  51. read(l[i]);
  52. read(r[i]);
  53. }
  54. for (int i = ; i <= n; i++)
  55. {
  56. for (int j = ; j <= n; j++)
  57. {
  58. if (i != j)
  59. solve(i , j);
  60. }
  61. }
  62. cout<< ans << '\n';
  63. cout<< (int)fans.size() << '\n';
  64. for (unsigned i = ; i < (int)fans.size(); i++) cout<< fans[i] << ' ';
  65. cout<< '\n';
  66.  
  67. return ;
  68.  
  69. }

Hard Version :

                      我们可以先选择所有线段           

                      那么 , 问题就转化为 , 选择一些区间进行操作 , 使得[li , ri]每个数增加1 , 最大化序列中的最大值 - 最小值

考虑枚举最大值出现的位置 , 显然 , 我们可以贪心地选择所有覆盖了该位置的线段

那么我们就可以使用扫描线算法 :

从1-n按顺序枚举最大值出现的位置i , 考虑所有以i为左端点的线段 , 我们选择这些线段进行操作 , 然后考虑所有以i为右端点的线段 , 取消对这些线段的操作

维护一棵支持区间修改 , 询问区间最大 / 最小值的线段树即可

时间复杂度 : O(NMlogN)

[代码]

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. const int MAXN = 2e5 + ;
  4.  
  5. #pragma GCC optimize(2)
  6. #define rint register int
  7.  
  8. typedef long long ll;
  9. typedef long double ld;
  10. typedef unsigned long long ull;
  11.  
  12. int n , m;
  13. int l[MAXN] , r[MAXN] , val[MAXN];
  14. vector< int > s[MAXN] , e[MAXN];
  15. bool tag[MAXN];
  16.  
  17. struct Segment_Tree
  18. {
  19. struct Node
  20. {
  21. int l , r , tag;
  22. pair<int , int> value;
  23. } a[MAXN << ];
  24. inline void build(int index , int l , int r)
  25. {
  26. a[index].l = l , a[index].r = r;
  27. a[index].tag = ;
  28. if (l == r)
  29. {
  30. a[index].value = make_pair(val[l] , val[l]);
  31. return;
  32. }
  33. int mid = (l + r) >> ;
  34. build(index << , l , mid);
  35. build(index << | , mid + , r);
  36. update(index);
  37. }
  38. inline void update(int index)
  39. {
  40. a[index].value.first = min(a[index << ].value.first , a[index << | ].value.first);
  41. a[index].value.second = max(a[index << ].value.second , a[index << | ].value.second);
  42. }
  43. inline void pushdown(int index)
  44. {
  45. a[index << ].value.first += a[index].tag;
  46. a[index << | ].value.first += a[index].tag;
  47. a[index << ].value.second += a[index].tag;
  48. a[index << | ].value.second += a[index].tag;
  49. a[index << ].tag += a[index].tag;
  50. a[index << | ].tag += a[index].tag;
  51. a[index].tag = ;
  52. }
  53. inline void modify(int index , int l , int r , int val)
  54. {
  55. if (a[index].l == l && a[index].r == r)
  56. {
  57. a[index].value.first += val;
  58. a[index].value.second += val;
  59. a[index].tag += val;
  60. return;
  61. }
  62. pushdown(index);
  63. int mid = (a[index].l + a[index].r) >> ;
  64. if (mid >= r) modify(index << , l , r , val);
  65. else if (mid + <= l) modify(index << | , l , r , val);
  66. else
  67. {
  68. modify(index << , l , mid , val);
  69. modify(index << | , mid + , r , val);
  70. }
  71. update(index);
  72. }
  73. inline pair<int , int> query()
  74. {
  75. return a[].value;
  76. }
  77. } SGT;
  78.  
  79. template <typename T> inline void chkmax(T &x,T y) { x = max(x,y); }
  80. template <typename T> inline void chkmin(T &x,T y) { x = min(x,y); }
  81. template <typename T> inline void read(T &x)
  82. {
  83. T f = ; x = ;
  84. char c = getchar();
  85. for (; !isdigit(c); c = getchar()) if (c == '-') f = -f;
  86. for (; isdigit(c); c = getchar()) x = (x << ) + (x << ) + c - '';
  87. x *= f;
  88. }
  89.  
  90. int main()
  91. {
  92.  
  93. read(n); read(m);
  94. for (rint i = ; i <= n; i++) read(val[i]);
  95. SGT.build( , , n);
  96. for (rint i = ; i <= m; i++)
  97. {
  98. read(l[i]);
  99. read(r[i]);
  100. s[l[i]].push_back(r[i]);
  101. e[r[i]].push_back(l[i]);
  102. SGT.modify( , l[i] , r[i] , -);
  103. }
  104. int mx = , loc = ;
  105. for (rint i = ; i <= n; i++)
  106. {
  107. for (unsigned j = ; j < s[i].size(); j++)
  108. SGT.modify( , i , s[i][j] , );
  109. pair<int , int> tmp = SGT.query();
  110. if (tmp.second - tmp.first > mx)
  111. {
  112. mx = tmp.second - tmp.first;
  113. loc = i;
  114. }
  115. for (unsigned j = ; j < e[i].size(); j++)
  116. SGT.modify( , e[i][j] , i , -);
  117. }
  118. cout<< mx << '\n';
  119. vector< int > res;
  120. for (int i = ; i <= m; i++)
  121. {
  122. if (l[i] > loc || r[i] < loc)
  123. res.push_back(i);
  124. }
  125. cout<< (int)res.size() << '\n';
  126. for (unsigned i = ; i < res.size(); i++) cout<< res[i] << ' ';
  127. cout<< '\n';
  128.  
  129. return ;
  130.  
  131. }

Problem F. MST Unification

[题解]

首先用kruskal算法求出这个图的任意一棵最小生成树

枚举不在这颗最小生成树上的每一条边(u , v , w)

若加入这条边 , 则形成了一个环 , 若环上的边权除这条边外的最大值 = w , 那么说明可以用这条边替换环上权值 = w的边 , 我们需要将这条边的权值加一

倍增即可

时间复杂度 : O((N + M)logN)

[代码]

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. typedef long long ll;
  4. typedef long double ld;
  5. typedef unsigned long long ull;
  6. const int MAXN = 2e5 + ;
  7. const int MAXLOG = ;
  8.  
  9. struct Edge
  10. {
  11. int x,y;
  12. long long w;
  13. } edge[MAXN << ];
  14.  
  15. int T,n,m,i;
  16. long long val;
  17. vector< pair<int,long long> > e[MAXN];
  18. bool on_mst[MAXN];
  19. int fa[MAXN],anc[MAXN][MAXLOG],dep[MAXN];
  20. long long mx[MAXN][MAXLOG];
  21. bool not_unique;
  22.  
  23. inline bool cmp(Edge a,Edge b) { return a.w < b.w; }
  24. inline int get_root(int x)
  25. {
  26. if (fa[x] == x) return x;
  27. return fa[x] = get_root(fa[x]);
  28. }
  29. inline void kruskal()
  30. {
  31. int i,x,y,sx,sy;
  32. long long w;
  33. for (i = ; i <= n; i++) fa[i] = i;
  34. for (i = ; i <= m; i++) on_mst[i] = false;
  35. sort(edge+,edge+m+,cmp);
  36. for (i = ; i <= m; i++)
  37. {
  38. x = edge[i].x;
  39. y = edge[i].y;
  40. w = edge[i].w;
  41. sx = get_root(x);
  42. sy = get_root(y);
  43. if (sx != sy)
  44. {
  45. on_mst[i] = true;
  46. val += w;
  47. fa[sx] = sy;
  48. e[x].push_back(make_pair(y,w));
  49. e[y].push_back(make_pair(x,w));
  50. }
  51. }
  52. }
  53. inline void build(int u)
  54. {
  55. int i,v;
  56. for (i = ; i < MAXLOG; i++)
  57. {
  58. anc[u][i] = anc[anc[u][i-]][i-];
  59. mx[u][i] = max(mx[u][i-],mx[anc[u][i-]][i-]);
  60. }
  61. for (i = ; i < e[u].size(); i++)
  62. {
  63. v = e[u][i].first;
  64. if (anc[u][] != v)
  65. {
  66. dep[v] = dep[u] + ;
  67. anc[v][] = u;
  68. mx[v][] = e[u][i].second;
  69. build(v);
  70. }
  71. }
  72. }
  73. inline long long get(int x,int y)
  74. {
  75. int i,t;
  76. long long ans = ;
  77. if (dep[x] > dep[y]) swap(x,y);
  78. t = dep[y] - dep[x];
  79. for (i = ; i < MAXLOG; i++)
  80. {
  81. if (t & ( << i))
  82. {
  83. ans = max(ans,mx[y][i]);
  84. y = anc[y][i];
  85. }
  86. }
  87. if (x == y) return ans;
  88. for (i = MAXLOG - ; i >= ; i--)
  89. {
  90. if (anc[x][i] != anc[y][i])
  91. {
  92. ans = max(ans,max(mx[x][i],mx[y][i]));
  93. x = anc[x][i];
  94. y = anc[y][i];
  95. }
  96. }
  97. return max(ans,max(mx[x][],mx[y][]));
  98. }
  99. int main()
  100. {
  101.  
  102. scanf("%d%d",&n,&m);
  103. val = ;
  104. not_unique = false;
  105. for (i = ; i <= n; i++)
  106. {
  107. dep[i] = ;
  108. e[i].clear();
  109. memset(anc[i],,sizeof(anc[i]));
  110. memset(mx[i],,sizeof(mx[i]));
  111. }
  112. for (i = ; i <= m; i++) scanf("%d%d%lld",&edge[i].x,&edge[i].y,&edge[i].w);
  113. kruskal();
  114. build();
  115. int ans = ;
  116. for (i = ; i <= m; i++)
  117. {
  118. if (!on_mst[i])
  119. ans += (get(edge[i].x,edge[i].y) == edge[i].w);
  120. }
  121. cout<< ans << '\n';
  122.  
  123. return ;
  124.  
  125. }

Codeforces Round #535(div 3) 简要题解的更多相关文章

  1. Codeforces Round #557 (Div. 1) 简要题解

    Codeforces Round #557 (Div. 1) 简要题解 codeforces A. Hide and Seek 枚举起始位置\(a\),如果\(a\)未在序列中出现,则对答案有\(2\ ...

  2. Codeforces Round #545 (Div. 1) 简要题解

    这里没有翻译 Codeforces Round #545 (Div. 1) T1 对于每行每列分别离散化,求出大于这个位置的数字的个数即可. # include <bits/stdc++.h&g ...

  3. Codeforces Round #483 (Div. 1) 简要题解

    来自FallDream的博客,未经允许,请勿转载,谢谢. 为了证明一下我又来更新了,写一篇简要的题解吧. 这场比赛好像有点神奇,E题莫名是道原题,导致有很多选手直接过掉了(Claris 表演24s过题 ...

  4. Codeforces Round #498 (Div. 3) 简要题解

    [比赛链接] https://codeforces.com/contest/1006 [题解] Problem A. Adjacent Replacements        [算法] 将序列中的所有 ...

  5. [题解][Codeforces]Codeforces Round #602 (Div. 1) 简要题解

    orz djq_cpp lgm A 题意 给定一个分别含有 \(\frac n2\) 个左括号和右括号的括号序列 每次可以将序列的一个区间翻转 求一个不超过 \(n\) 次的操作方案,使得操作完之后的 ...

  6. Codeforces Round #398 (div.2)简要题解

    这场cf时间特别好,周六下午,于是就打了打(谁叫我永远1800上不去div1) 比以前div2的题目更均衡了,没有太简单和太难的...好像B题难度高了很多,然后卡了很多人. 然后我最后做了四题,E题感 ...

  7. Codeforces Round #588 (Div. 1) 简要题解

    1. 1229A Marcin and Training Camp 大意: 给定$n$个对$(a_i,b_i)$, 要求选出一个集合, 使得不存在一个元素好于集合中其他所有元素. 若$a_i$的二进制 ...

  8. Codeforces Round #576 (Div. 1) 简要题解 (CDEF)

    1198 C Matching vs Independent Set 大意: 给定$3n$个点的无向图, 求构造$n$条边的匹配, 或$n$个点的独立集. 假设已经构造出$x$条边的匹配, 那么剩余$ ...

  9. Codeforces Round #535 (Div. 3) 题解

    Codeforces Round #535 (Div. 3) 题目总链接:https://codeforces.com/contest/1108 太懒了啊~好久之前的我现在才更新,赶紧补上吧,不能漏掉 ...

随机推荐

  1. K-L变换

    K-L变换( Karhunen-Loeve Transform)是建立在统计特性基础上的一种变换,有的文献也称为霍特林(Hotelling)变换,因他在1933年最先给出将离散信号变换成一串不相关系数 ...

  2. OpenCV入门笔记(一) Linux下的安装

    关于OpenCV,有中文的官方站点.里面翻译了官网的教程和API等.中文官方Tutorials见这里:[Tutorials] 一.Ubuntu下的安装 能够选择直接从库里安装,或者手动编译安装,请參考 ...

  3. Spring集成JDBC

    不同spring版本合成的方式,有时候不一样,需要查看帮助文档来看如何集成,帮助文档在spring发行包中. 1.导入spring的包(这里吧Spring-3.1.3 Release的所有jar包都导 ...

  4. android 5.X Toolbar+DrawerLayout实现抽屉菜单

    前言  android5.X新增的一个控件Toolbar,这个控件比ActionBar更加自由,可控,因为曾经的ActionBar的灵活性比較差,所以google逐渐使用Toolbar替代Action ...

  5. Django缓存问题

    由于Django是动态网站,所有每次请求均会去数据进行相应的操作,当程序访问量大时,耗时必然会更加明显,最简单解决方式是使用:缓存,缓存将一个某个views的返回值保存至内存或者memcache中,5 ...

  6. xadmin入门使用

    ,官方文档:http://xadmin.readthedocs.io/en/docs-chinese/views_api.html 中文文档:https://www.kancloud.cn/net_y ...

  7. ECharts整合HT&#160;for&#160;Web的网络拓扑图应用

    ECharts图形组件在1.0公布的时候我就已经有所关注.今天在做项目的时候遇到了图标的需求,在HTfor Web上也有图形组件的功能.可是在尝试了下详细实现后,发现HT for Web的图形组件是以 ...

  8. datatable的使用

    学习可参考:http://www.guoxk.com/node/jquery-datatables http://yuemeiqing2008-163-com.iteye.com/blog/20069 ...

  9. HashSet、LinkHashSet、TreeSet总结

    HashSet:散列集,集合中的元素不允许重复,但是不要求顺序,输出的顺序和进入HashSet的顺序是没有关系的 LinkedHashSet :链表散列集,集合中的元素不允许重复,同时要求和进入Set ...

  10. 【重磅干货】看了此文,Oracle SQL优化文章不必再看!

    目录 SQL优化的本质 SQL优化Road Map 2.1 制定SQL优化目标 2.2 检查执行计划 2.3 检查统计信息 2.4 检查高效访问结构 2.5 检查影响优化器的参数 2.6 SQL语句编 ...