5-1

  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;
  4. template <class T> T maxn(T x[], int len)
  5. {
  6. int i;
  7. T store = x[0];
  8. int k = 0;
  9. for (i = 0; i < len; i++)
  10. {
  11. if(x[i] > x[k]) k = i;
  12. }
  13. store = x[k];
  14. return store;
  15. }
  16. class time0
  17. {
  18. private:
  19. int hh,mm,ss;
  20. public:
  21. time0(int a = 0, int b = 0, int c = 0):hh(a),mm(b),ss(c){};
  22. bool operator > (time0 &t);
  23. void display();
  24. };
  25. void time0::display()
  26. {
  27. cout << hh << " " << mm << " " << ss << endl;
  28. }
  29. bool time0::operator > (time0 &t)
  30. {
  31. int pre = 0, beh = 0;
  32. pre = hh * 3600 + mm * 60 + ss;
  33. beh = t.hh * 3600 + t.mm * 60 + ss;
  34. if(pre > beh)return true;
  35. else return false;
  36. }
  37. class date
  38. {
  39. private:
  40. int year,mouth,day;
  41. public:
  42. date(int a = 0, int b = 0, int c = 0):year(a),mouth(b),day(c){};
  43. bool operator > (date &d);
  44. void display();
  45. };
  46. void date::display()
  47. {
  48. cout << year << " " << mouth << " " << day << endl;
  49. }
  50. bool date::operator > (date &d)
  51. {
  52. int pre = 0, beh = 0;
  53. pre = year * 365 + mouth * 30 + day;
  54. beh = d.year * 365 + d.mouth * 30 + day;
  55. if(pre > beh)return true;
  56. else return false;
  57. }
  58. int intArray[100];
  59. double douArray[100];
  60. time0 timeArray[100];
  61. date dateArray[100];
  62. int main()
  63. {
  64. int ope;
  65. int i,j;
  66. while(cin >> ope)
  67. {
  68. if(ope == -1)break;
  69. if(ope == 1)
  70. {
  71. int tot = 0;
  72. while(1)
  73. {
  74. int w;
  75. cin >> w;
  76. if(w == 0)break;
  77. intArray[tot++] = w;
  78. }
  79. double result = 0;
  80. result = maxn<int> (intArray,tot);
  81. cout << result << endl;
  82. }
  83. else if(ope == 2)
  84. {
  85. int tot = 0;
  86. while(1)
  87. {
  88. double w;
  89. cin >> w;
  90. if(w == 0)break;
  91. douArray[tot++] = w;
  92. }
  93. double result = 0;
  94. result = maxn<double> (douArray,tot);
  95. cout << result << endl;
  96. }
  97. else if(ope == 3)
  98. {
  99. int hh1,mm1,ss1;
  100. int tot = 0;
  101. while(1)
  102. {
  103. cin >> hh1;
  104. if(hh1 == 0)break;
  105. cin >> mm1 >> ss1;
  106. time0 t(hh1,mm1,ss1);
  107. timeArray[tot++] = t;
  108. }
  109. time0 result;
  110. result = maxn<time0> (timeArray, tot);
  111. result.display();
  112. }
  113. else if(ope == 4)
  114. {
  115. int hh1,mm1,ss1;
  116. int tot = 0;
  117. while(1)
  118. {
  119. cin >> hh1;
  120. if(hh1 == 0)break;
  121. cin >> mm1 >> ss1;
  122. date t(hh1,mm1,ss1);
  123. dateArray[tot++] = t;
  124. }
  125. date result;
  126. result = maxn<date> (dateArray, tot);
  127. result.display();
  128. }
  129. }
  130. return 0;
  131. }

5-2

  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <string>
  4. using namespace std;
  5. template <class T> int addSet(T * myset, T elem,int len)
  6. {
  7. if(len > 100)
  8. {
  9. cout << "Full Set." << endl;
  10. return len;
  11. }
  12. int i, j;
  13. for(i = 0; i < len; i++)
  14. {
  15. if(*(myset + i) == elem)
  16. {
  17. cout << elem << " is already exist!" << endl;
  18. return len;
  19. }
  20. }
  21. *(myset + len) = elem;
  22. cout << len-1 << endl;
  23. len ++;
  24. return len;
  25. }
  26. template <class T> int deleSet(T * myset, T elem, int len)
  27. {
  28. int i, j;
  29. bool flag = false;
  30. int beg = 1;
  31. for(i = 0; i < len; i++)
  32. {
  33. if(*(myset + i) == elem)
  34. {
  35. flag = true;
  36. beg = i;
  37. break;
  38. }
  39. }
  40. if(!flag)
  41. {
  42. cout << elem << " is not exist!" << endl;
  43. return len;
  44. }
  45. cout << beg-1 << endl;
  46. for(i = beg, j = beg + 1; j < len; i++, j++)
  47. {
  48. *(myset + i) = *(myset + j);
  49. }
  50. len --;
  51. return len;
  52. }
  53. template <class T> int findElem(T * myset, T elem, int len)
  54. {
  55. int i, j;
  56. for(i = 0; i < len; i++)
  57. {
  58. if(*(myset + i) == elem)
  59. {
  60. return i;
  61. }
  62. }
  63. return -1;
  64. }
  65. int intSet[100];
  66. double douSet[100];
  67. string StrSet[100];
  68. int main()
  69. {
  70. int intLen = 1, douLen = 1, strLen = 1;
  71. int i;
  72. int ope;
  73. while(cin >> ope)
  74. {
  75. if(ope == 0)break;
  76. if(ope == 1)
  77. {
  78. int nope, inum;
  79. cin >> nope >> inum;
  80. if(nope == 1)
  81. {
  82. intLen = addSet<int> (intSet, inum, intLen);
  83. }
  84. else if(nope == 2)
  85. {
  86. intLen = deleSet<int> (intSet, inum, intLen);
  87. }
  88. else if(nope == 3)
  89. {
  90. int judge = findElem<int> (intSet, inum, intLen);
  91. if(judge == -1)
  92. {
  93. cout << inum << " is not exist!" << endl;
  94. }
  95. else
  96. {
  97. cout << judge-1 << endl;
  98. }
  99. }
  100. }
  101. else if(ope == 2)
  102. {
  103. int nope;
  104. double inum;
  105. cin >> nope >> inum;
  106. if(nope == 1)
  107. {
  108. douLen = addSet<double> (douSet, inum, douLen);
  109. }
  110. else if(nope == 2)
  111. {
  112. douLen = deleSet<double> (douSet, inum, douLen);
  113. }
  114. else if(nope == 3)
  115. {
  116. int judge = findElem<double> (douSet, inum, douLen);
  117. if(judge == -1)
  118. {
  119. cout << inum << " is not exist!" << endl;
  120. }
  121. else
  122. {
  123. cout << judge-1 << endl;
  124. }
  125. }
  126. }
  127. else if(ope == 3)
  128. {
  129. int nope;
  130. string inum;
  131. cin >> nope >> inum;
  132. if(nope == 1)
  133. {
  134. strLen = addSet<string> (StrSet, inum, strLen);
  135. }
  136. else if(nope == 2)
  137. {
  138. strLen = deleSet<string> (StrSet, inum, strLen);
  139. }
  140. else if(nope == 3)
  141. {
  142. int judge = findElem<string> (StrSet, inum, strLen);
  143. if(judge == -1)
  144. {
  145. cout << inum << " is not exist!" << endl;
  146. }
  147. else
  148. {
  149. cout << judge-1 << endl;
  150. }
  151. }
  152. }
  153. }
  154. return 0;
  155. }

5-3

(听说用5-2的代码也能过噢

  1. #include <iostream>
  2. #include <stdlib.h>
  3. using namespace std;
  4. template <class T> class MySet
  5. {
  6. private:
  7. T data[100];
  8. int count;
  9. public:
  10. MySet()
  11. {
  12. count = 0;
  13. };
  14. int addSet(T elem)
  15. {
  16. if(count > 100)
  17. {
  18. cout << "Full Set." << endl;
  19. return count;
  20. }
  21. int i, j;
  22. for(i = 0; i < count; i++)
  23. {
  24. if(data[i] == elem)
  25. {
  26. cout << elem << " is already exist!" << endl;
  27. return count;
  28. }
  29. }
  30. data[count] = elem;
  31. cout << count << endl;
  32. count ++;
  33. return count;
  34. };
  35. int deleSet(T elem)
  36. {
  37. int i, j;
  38. bool flag = false;
  39. int beg = 1;
  40. for(i = 0; i < count; i++)
  41. {
  42. if(data[i] == elem)
  43. {
  44. flag = true;
  45. beg = i;
  46. break;
  47. }
  48. }
  49. if(!flag)
  50. {
  51. cout << elem << " is not exist!" << endl;
  52. return count;
  53. }
  54. cout << beg << endl;
  55. for(i = beg, j = beg + 1; j < count; i++, j++)
  56. {
  57. data[i] = data[j];
  58. }
  59. count --;
  60. return count;
  61. };
  62. int findElem(T elem)
  63. {
  64. int i, j;
  65. for(i = 0; i < count; i++)
  66. {
  67. if(data[i] == elem)
  68. {
  69. return i;
  70. }
  71. }
  72. return -1;
  73. };
  74. };
  75. //int MySet::addSet(T elem)
  76. //int MySet::deleSet(T elem)
  77. //int MySet::findElem(T elem)
  78. int main()
  79. {
  80. MySet<int> intSet;
  81. MySet<double> douSet;
  82. MySet<string> strSet;
  83. int intLen = 1, douLen = 1, strLen = 1;
  84. int i;
  85. int ope;
  86. while(cin >> ope)
  87. {
  88. if(ope == 0)break;
  89. if(ope == 1)
  90. {
  91. int nope, inum;
  92. cin >> nope >> inum;
  93. if(nope == 1)
  94. {
  95. intLen = intSet.addSet(inum);
  96. }
  97. else if(nope == 2)
  98. {
  99. intLen = intSet.deleSet(inum);
  100. }
  101. else if(nope == 3)
  102. {
  103. int judge = intSet.findElem(inum);
  104. if(judge == -1)
  105. {
  106. cout << inum << " is not exist!" << endl;
  107. }
  108. else
  109. {
  110. cout << judge << endl;
  111. }
  112. }
  113. }
  114. else if(ope == 2)
  115. {
  116. int nope;
  117. double inum;
  118. cin >> nope >> inum;
  119. if(nope == 1)
  120. {
  121. douLen = douSet.addSet(inum);
  122. }
  123. else if(nope == 2)
  124. {
  125. douLen = douSet.deleSet(inum);
  126. }
  127. else if(nope == 3)
  128. {
  129. int judge = douSet.findElem(inum);
  130. if(judge == -1)
  131. {
  132. cout << inum << " is not exist!" << endl;
  133. }
  134. else
  135. {
  136. cout << judge << endl;
  137. }
  138. }
  139. }
  140. else if(ope == 3)
  141. {
  142. int nope;
  143. string inum;
  144. cin >> nope >> inum;
  145. if(nope == 1)
  146. {
  147. strLen = strSet.addSet(inum);
  148. }
  149. else if(nope == 2)
  150. {
  151. strLen = strSet.deleSet(inum);
  152. }
  153. else if(nope == 3)
  154. {
  155. int judge = strSet.findElem(inum);
  156. if(judge == -1)
  157. {
  158. cout << inum << " is not exist!" << endl;
  159. }
  160. else
  161. {
  162. cout << judge << endl;
  163. }
  164. }
  165. }
  166. }
  167. return 0;
  168. }

5-4

注意:(备注说明:分数为0时,表示成0z1m,如果结果为负数,那么分子取负数,分母为正数)

  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <sstream>
  4. #include <cmath>
  5. using namespace std;
  6. int small(int a, int b)
  7. {
  8. if(a == 0 || b == 0)return 0;
  9. int t;
  10. if(a < b)
  11. {
  12. t = a; a = b; b = t;
  13. }
  14. int c = a % b;
  15. while(c != 0)
  16. {
  17. a = b;
  18. b = c;
  19. c = a % b;
  20. }
  21. return b;
  22. }
  23. class FS
  24. {
  25. private:
  26. int fz,fm;
  27. public:
  28. FS(int a = 0, int b = 0):fz(a),fm(b){};
  29. FS operator + (const FS &f);
  30. void display();
  31. };
  32. void FS::display()
  33. {
  34. bool flag = false;
  35. if(fz * fm == 0)
  36. {
  37. cout << "0z1m" << endl;
  38. return ;
  39. }
  40. if(fz * fm < 0)
  41. {
  42. flag = true;
  43. }
  44. if(fz < 0)fz = -fz;
  45. if(fm < 0)fm = -fm;
  46. if(flag)cout << "-";
  47. cout << fz << "z" << fm << "m" << endl;
  48. }
  49. FS FS::operator + (const FS &f)
  50. {
  51. bool flag1 = false, flag2 = false; // false - true +
  52. if(fz*fm < 0)flag1 = true;
  53. if(f.fz*f.fm < 0)flag2 = true;
  54. int newfz = 0,newfm = 0;
  55. if(!flag1 && !flag2)
  56. {
  57. int common = 0;
  58. if(fz == 0 || f.fz == 0)
  59. {
  60. if(fz == 0)
  61. {
  62. newfz = f.fz;
  63. newfm = f.fm;
  64. }
  65. else if(f.fz == 0)
  66. {
  67. newfz = fz;
  68. newfm = fm;
  69. }
  70. }
  71. else
  72. {
  73. newfz = fz * f.fm + fm * f.fz;
  74. newfm = fm * f.fm;
  75. }
  76. if(newfz != 0)
  77. {
  78. common = small(newfz,newfm);
  79. newfz /= common;
  80. newfm /= common;
  81. }
  82. }
  83. else if(!flag1 && flag2)
  84. {
  85. int common = 0;
  86. if(fz == 0 || f.fz == 0)
  87. {
  88. if(fz == 0)
  89. {
  90. newfz = f.fz;
  91. newfm = f.fm;
  92. }
  93. else if(f.fz == 0)
  94. {
  95. newfz = fz;
  96. newfm = fm;
  97. }
  98. }
  99. else
  100. {
  101. newfz = fz * f.fm + fm * f.fz;
  102. newfm = fm * f.fm;
  103. }
  104. if(newfz != 0)
  105. {
  106. common = small(newfz,newfm);
  107. newfz /= common;
  108. newfm /= common;
  109. }
  110. }
  111. else if(flag1 && !flag2)
  112. {
  113. int common = 0;
  114. if(fz == 0 || f.fz == 0)
  115. {
  116. if(fz == 0)
  117. {
  118. newfz = f.fz;
  119. newfm = f.fm;
  120. }
  121. else if(f.fz == 0)
  122. {
  123. newfz = fz;
  124. newfm = fm;
  125. }
  126. }
  127. else
  128. {
  129. newfz = fz * f.fm + fm * f.fz;
  130. newfm = fm * f.fm;
  131. }
  132. if(newfz != 0)
  133. {
  134. common = small(newfz,newfm);
  135. newfz /= common;
  136. newfm /= common;
  137. }
  138. }
  139. else if(flag1 && flag2)
  140. {
  141. int common = 0;
  142. newfz = - (fz * f.fm + fm * f.fz);
  143. newfm = fm * f.fm;
  144. if(newfz != 0)
  145. {
  146. common = small(newfz,newfm);
  147. newfz /= common;
  148. newfm /= common;
  149. }
  150. newfz = -newfz;
  151. }
  152. FS f1(newfz,newfm);
  153. return f1;
  154. }
  155. int main()
  156. {
  157. int n;
  158. int i,j,k;
  159. cin >> n;
  160. string s1,s2;
  161. stringstream stream;
  162. int sfz = 0, sfm = 0;
  163. for(k = 1; k <= n; k++)
  164. {
  165. cin >> s1 >> s2;
  166. string s;
  167. for(i = 0; i < s1.length(); i++)
  168. {
  169. if(s1[i] == 'z')
  170. {
  171. stream << s;
  172. stream >> sfz;
  173. stream.clear();
  174. s = "";
  175. continue;
  176. }
  177. if(s1[i] == 'm')
  178. {
  179. stream << s;
  180. stream >> sfm;
  181. stream.clear();
  182. s = "";
  183. break;
  184. }
  185. s += s1[i];
  186. }
  187. FS c1(sfz,sfm);
  188. s = "";
  189. sfz = 0;
  190. sfm = 0;
  191. for(i = 0; i < s2.length(); i++)
  192. {
  193. if(s2[i] == 'z')
  194. {
  195. stream << s;
  196. stream >> sfz;
  197. stream.clear();
  198. s = "";
  199. continue;
  200. }
  201. if(s2[i] == 'm')
  202. {
  203. stream << s;
  204. stream >> sfm;
  205. stream.clear();
  206. s = "";
  207. break;
  208. }
  209. s += s2[i];
  210. }
  211. FS c2(sfz,sfm);
  212. s = "";
  213. sfz = 0;
  214. sfm = 0;
  215. FS c3 = c1 + c2;
  216. c3.display();
  217. }
  218. return 0;
  219. }

5-5

考虑的情况比较多,需要耐心。

  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <string>
  4. #include <sstream>
  5. using namespace std;
  6. class Complex
  7. {
  8. private:
  9. int real, imag;
  10. public:
  11. Complex(int a = 0, int b = 0):real(a), imag(b){};
  12. void display();
  13. Complex operator * (Complex &b);
  14. };
  15. void Complex::display()
  16. {
  17. if(real == 0 && imag == 0)
  18. {
  19. cout << "0" << endl;
  20. return ;
  21. }
  22. else if(real == 0)
  23. {
  24. if(imag != 1 && imag != -1)
  25. cout << imag << "i" << endl;
  26. else if(imag == 1)
  27. cout << "i" << endl;
  28. else
  29. cout << "-i" << endl;
  30. return ;
  31. }
  32. else if(imag == 0)
  33. {
  34. cout << real << endl;
  35. return ;
  36. }
  37. if(imag < 0)
  38. {
  39. if(imag != -1)
  40. cout << real << imag << "i" << endl;
  41. else cout << real << "-i" << endl;
  42. }
  43. else
  44. {
  45. if(imag != 1)
  46. cout << real << "+" << imag << "i" << endl;
  47. else if(imag == 1)
  48. cout << real << "+i" << endl;
  49. }
  50. }
  51. Complex Complex::operator * (Complex &b)
  52. {
  53. int creal = 0, cimag = 0;
  54. creal = real * b.real - imag * b.imag;
  55. cimag = real * b.imag + b.real * imag;
  56. Complex c(creal, cimag);
  57. return c;
  58. }
  59. int main()
  60. {
  61. string s1, s2;
  62. int i;
  63. while (cin >> s1 >> s2)
  64. {
  65. string s;
  66. stringstream stream;
  67. int areal = 0, aimag = 0;
  68. int breal = 0, bimag = 0;
  69. for (i = 0; i < s1.length(); i++)
  70. {
  71. if (i == 0 && s1[0] == '-')
  72. {
  73. s += '-';
  74. continue;
  75. }
  76. if (s1[i] == '+' || s1[i] == '-')
  77. {
  78. stream << s;
  79. stream >> areal;
  80. stream.clear();
  81. s = "";
  82. if (s1[i] == '-')
  83. s += '-';
  84. continue;
  85. }
  86. if (s1[i] == 'i')
  87. {
  88. if(s == "-" || s == "")
  89. {
  90. if(s == "-")aimag = -1;
  91. else aimag = 1;
  92. s = "";
  93. break;
  94. }
  95. stream << s;
  96. stream >> aimag;
  97. stream.clear();
  98. s = "";
  99. break;
  100. }
  101. s += s1[i];
  102. }
  103. if (s != "")
  104. {
  105. stream << s;
  106. stream >> areal;
  107. stream.clear();
  108. s = "";
  109. }
  110. s = "";
  111. for (i = 0; i < s2.length(); i++)
  112. {
  113. if (i == 0 && s2[0] == '-')
  114. {
  115. s += '-';
  116. continue;
  117. }
  118. if (s2[i] == '+' || s2[i] == '-')
  119. {
  120. stream << s;
  121. stream >> breal;
  122. stream.clear();
  123. s = "";
  124. if (s2[i] == '-')
  125. s += '-';
  126. continue;
  127. }
  128. if (s2[i] == 'i')
  129. {
  130. if(s == "-" || s == "")
  131. {
  132. if(s == "-")bimag = -1;
  133. else bimag = 1;
  134. s = "";
  135. break;
  136. }
  137. stream << s;
  138. stream >> bimag;
  139. stream.clear();
  140. s = "";
  141. break;
  142. }
  143. s += s2[i];
  144. }
  145. if (s != "")
  146. {
  147. stream << s;
  148. stream >> breal;
  149. stream.clear();
  150. s = "";
  151. }
  152. Complex A(areal, aimag), B(breal, bimag);
  153. Complex C = A * B;
  154. //A.display();
  155. //B.display();
  156. C.display();
  157. }
  158. return 0;
  159. }
  160. //i -i

PAT第二次上机题目的更多相关文章

  1. SDN 第二次上机作业

    SDN第二次上机作业 1.控制器floodlight所示可视化图形拓扑的截图,及主机拓扑连通性检测截图 拓扑 连通性 2.利用字符界面下发流表,使得'h1'和'h2' ping 不通 流表截图 连通性 ...

  2. 2019 SDN第二次上机作业

    2019 SDN第二次上机作业 1. 利用mininet创建如下拓扑,要求拓扑支持OpenFlow 1.3协议,主机名.交换机名以及端口对应正确,请给出拓扑Mininet执行结果,展示端口连接情况 创 ...

  3. 连连看游戏(dfs)【华为上机题目】

    1 连连看游戏 今天同学给我做了道编程题目,貌似是华为的,题目描述大概是这样的: 给定一个连连看棋盘,棋盘上每个点都有各种图案(用非0数字表示),输入棋盘上的任意两个左标,判断这两个坐标对应的图案是否 ...

  4. Java第二次上机随笔

    主要是一些原来不懂但是本次上机涉及到的内容... 一.空数组与数组为null的区别 1.空数组: int[] array = new int[0]; array.length == 0; 空数组是一个 ...

  5. ZOJ问题(2010浙江大学研究生复试上机题目[找规律] hdoj 3788)

    ZOJ问题 pid=3788">点击打开链接 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K ...

  6. 算法上机题目mergesort,priority queue,Quicksort,divide and conquer

    1.Implement exercise 2.3-7. 2. Implement priority queue. 3. Implement Quicksort and answer the follo ...

  7. 题解:2018级算法第二次上机 Zexal的排座位

    题目描述: 样例: 实现解释: 一道看似复杂但实际既是斐波那契变形的题目 知识点:递推,斐波那契 通过问题的描述,可以得到以下规律:(除了座位数为一时)男生坐最后时,倒数第二个一定是女生:女生坐最后, ...

  8. C++第二次上机5-5

    建立一个复数类Complex,实数和虚数是其私有数据成员: 建立复数类的无参和参数化构造函数: 建立一个 *(乘号)的运算符重载,以便于对两个复数直接进行乘法运算: 建立输出函数void displa ...

  9. 2016级算法第二次上机-G.ModricWang's Real QuickSort

    873 思路 这是一道非常基础的题,目的是帮助大家回顾快排相关的知识.大家完成此题之后应该就对快排有比较深刻的印象了. 对于整个快排的流程,题目描述中已经给了清晰完整的伪代码.需要自己加工的部分就是, ...

随机推荐

  1. Spark性能优化(一)

    前言 在大数据计算领域,Spark已经成为了越来越流行.越来越受欢迎的计算平台之一.Spark的功能涵盖了大数据领域的离线批处理.SQL类处理.流式/实时计算.机器学习.图计算等各种不同类型的计算操作 ...

  2. [py]处理文件的3个方法

    file处理的3个方法: f和f.readlines效果一样 # f.read() 所有行 -> 字符串 # f.readline 读取一行 -> 字符串 # f.readlines 所有 ...

  3. How to enable TLS 1.2 on Windows Server 2008 R2

    Problem How to enable TLS 1.2 on Windows Server 2008 R2? Resolution QuoVadis recommends enabling and ...

  4. BCB TLable控件透明背景属性

    当我们希望一个Label适应它父窗口的背景时,设置Tranparent属性值就OK Transparent:true 透明  false 不透明

  5. [转]VS中展开和折叠代码

    VS2005代码编辑器的展开和折叠代码确实很方便和实用.以下是展开代码和折叠代码所用到的快捷键,很常用: Ctrl + M + O: 折叠所有方法 Ctrl + M + M: 折叠或者展开当前方法 C ...

  6. LinkedList详解

    一.LinkedList的介绍与特点. 1.继承实现关系. 实现了双端队列接口Deque,因此具有双端队列的功能:addFirt,addLast,offerFirt,offerLast,removeF ...

  7. 植物大战僵尸作弊器源代码(MFC版)

    控制版使用不太方便,此MFC版与控制台版内容一样.具体可以参考前面.此处只附源代码,不加以说明.......... 头文件 // jsMFCDlg.h : 头文件 // #pragma once // ...

  8. 【kafka学习之四】kafka集群性能测试

    kafka集群的性能受限于JVM参数.服务器的硬件配置以及kafka的配置,因此需要对所要部署kafka的机器进行性能测试,根据测试结果,找出符合业务需求的最佳配置. 1.kafka broker j ...

  9. python中的对象(三)

    一.python对象 python使用对象模型来存储数据.构造任何类型的值都是一个对象. 所有python对象都拥有三个特性:身份.类型.值 身份:每个对象都有一个唯一的身份标识自己,任何对象的身份可 ...

  10. java commons.lang3 ArrayUtils使用

    java commons.lang3 ArrayUtils使用import org.apache.commons.lang3.ArrayUtils; /** *数组追加数组,不重复 */ public ...