2019年11月2日

背包问题c++动态规划方式

摘要: 2021年12月1日更新 java import java.util.*; public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * 计算01背包问题的结果 * @param V int整型 背包的体积 * @param 阅读全文

posted @ 2019-11-02 12:12 出发的兰彻 阅读(823) 评论(0) 推荐(0) 编辑

c++ 自行实现一个String类

摘要: #include <iostream> #include "stddef.h" #include <cstring> using namespace std; class String { private: uint32_t len; // 注意 private char* str_p; public: String(const char* str); // 构建函数无返回值 ~String(); 阅读全文

posted @ 2019-11-02 11:37 出发的兰彻 阅读(655) 评论(0) 推荐(0) 编辑

导航