摘要:
1.01背包 #include<iostream> #include <cstring> using namespace std; const int N = 1010; int f[N]; int main() { int n,m; while(cin >> n >> m){ int v,w; f 阅读全文
摘要:
1.01背包 #include<iostream> #include <cstring> using namespace std; const int N = 1010; int f[N]; int main() { int n,m; while(cin >> n >> m){ int v,w; f 阅读全文
摘要:
多态 (参考:https://www.cnblogs.com/alinh/p/9636352.html) 概念: 同一操作作用于不同的对象,可以有不同的解释,产生不同的执行结果。在运行时,可以通过指向基类的指针,来调用实现派生类中的方法。 对于C++中的多态:在基类的函数前加上virtual关键字, 阅读全文
|