正文
增加 5 行删除 5 行
8 行未改动9101112131415161744 行未改动62636465666768697042 行未改动11311411511611711811912012112245 行未改动16816917017117217317417517614 行未改动8 行未改动返回一个取值范围为[begin,end]的字符。template <typename T>T randNum(T begin, T end);返回一个取值范围为[begin,end]的数字。char* randString(const int& length, const bool& capitalLetterChar,const bool& littleLetterChar, const bool& numberChar)length为字符串的长度,其余的意为“字符串中是否包含某种类型的字符”,例如,numberChar为true则字符串中包含数字字符。返回一个不包含空格和换行的字符串。```44 行未改动ans = (T)(((double)rand() * 1.0 / RAND_MAX) * (double)(end - begin) + begin);return ans;}char* randString(const int& length, const bool& capitalLetterChar,const bool& littleLetterChar, const bool& numberChar) {char* ans = new char[length + 5];memset(ans, 0, sizeof(char) * (length + 5));int cnt = 0;42 行未改动a[i]-=26%n;}}printf("%s",a);return 0;}``````cpp/*debug.cpp*/45 行未改动system("maker.exe>inp");system("main<inp>out1");system("debug<inp>out2");//如果两个测试文件相同if (!system("fc out1 out2 > nul")) {printf("The %d case is OK.\n", ++kase);}else { //找到错误puts("Find error!");14 行未改动8 行未改动9101112131415161744 行未改动62636465666768697042 行未改动11311411511611711811912012112245 行未改动16816917017117217317417517614 行未改动8 行未改动返回一个取值范围为[begin,end]的字符。template <typename T>T randNum(T begin, T end);返回一个取值范围为[begin,end]的数字。char* randString(const int& length, const bool& capitalLetterChar,const bool& littleLetterChar, const bool& numberChar)length为字符串的长度,其余的意为“字符串中是否包含某种类型的字符”,例如,numberChar为true则字符串中包含数字字符。返回一个不包含空格和换行的字符串。```44 行未改动ans = (T)(((double)rand() * 1.0 / RAND_MAX) * (double)(end - begin) + begin);return ans;}char* randString(const int& length, const bool& capitalLetterChar,const bool& littleLetterChar, const bool& numberChar) {char* ans = new char[length + 5];memset(ans, 0, sizeof(char) * (length + 5));int cnt = 0;42 行未改动a[i]-=26%n;}}printf("%s",a);return 0;}``````cpp/*debug.cpp*/45 行未改动system("maker.exe>inp");system("main<inp>out1");system("debug<inp>out2");//如果两个测试文件相同if (!system("fc out1 out2 > nul")) {printf("The %d case is OK.\n", ++kase);}else { //找到错误puts("Find error!");14 行未改动