随笔分类 - C/C++
摘要:char name[64] = { "xiaohai" }; char* p = name; while (*p != '\0') { *p = toupper(*p); p++; } cout << name << endl;
阅读全文
摘要:void sorr(int array[], int start, int last) { for (int i = start; i < last-1; i++) { for (int j = start; j < last - 1;j++) { if (array[j] > array[j +
阅读全文
摘要:#include <iostream> using namespace std; class base1 { private: int a, b; public: base1(int i) : b(i + 1), a(b) {} base1():b(0), a(b) {} int get_a() {
阅读全文
摘要:子串(包括空串):n(n+1)/2 + 1 非空子串(不包括空串):n(n+1)/2 非空真子串(不包括空串和跟自己一样的子串):n(n+1)/2 - 1 所以答案是37
阅读全文

浙公网安备 33010602011771号