![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
答案
会编程的道君
一个立志于卷在当下,躺在日后的苦逼搬砖人!
展开
-
算法导论4
0-1背包#include<iostream>#include<vector>#include<algorithm>using namespace std;struct VER{ int w;//每个物品的重量 int v;//每个物品的价值};#define N 100 //默认有99个物品。第一个不使用int x[N]; //x[i]=1:物品i放入背包,0代表不放入int n,c; //n:一共有多少物品,c:原创 2021-06-27 15:17:55 · 247 阅读 · 0 评论 -
算法导论代码部分实现二
第二次上机矩阵链乘/* 1. Matrix-chain product. The following are some instances. a) <3, 5, 2, 1,10>b) <2, 7, 3, 6, 10>c) <10, 3, 15, 12, 7, 2>d) <7, 2, 4, 15, 20, 5> */#include<iostream>#include<algorithm>#define INF1 0x原创 2021-05-19 11:47:53 · 575 阅读 · 0 评论 -
算法导论部分代码实现1
第一次上机第一题分治策略//输入数组S,目标值x,找出是否存在两数之和等于x#include<iostream>#include<algorithm>#include<vector>using namespace std;//归并排序,时间复杂度 n l o g nvoid merge(vector<int> &T,int p,int q,int r){ // int n1=q-p+1; // int n2=r-原创 2021-05-19 11:40:25 · 256 阅读 · 0 评论 -
20200415 ooptest
20200415 ooptest一.单选题1Which among the following best describes polymorphism?A、It is the ability for a message/data to be processed in more than one formB、It is the ability for a message/dat...原创 2020-04-15 22:00:48 · 215 阅读 · 0 评论 -
2043 ooptest
2043 ooptest1How does private visibility affect attributes and operations?A、Makes them accessible only to other classes in the same packageB、Makes them accessible only to the class itself an...原创 2020-04-03 15:59:06 · 120 阅读 · 0 评论 -
c++课堂练习(5)
c++课堂练习(5)一.填空题*(共6题,66.6分)*1C++ programmers concentrate on creating , which contain data members and the member functions that manipulate those data members and provide services to clients....原创 2020-04-01 09:42:03 · 212 阅读 · 0 评论 -
oop课堂练习
test1加粗为答案The keyword void is used in a function header to indicate that a function dose not return a value or to indicate that a function contains no parameters.A variable declared outside any blo...原创 2020-03-26 14:52:44 · 232 阅读 · 0 评论 -
C++面向程序设计-练习答案
FIRSTWrite a program that prints the sizes of the fundamental types, a few pointer types, and a few enumerations of your choice. Use the sizeof operator.翻译(编写一个程序,打印基本类型的大小、一些指针类型和一些您选择的枚举。使用sizeof操...原创 2020-03-26 14:29:24 · 950 阅读 · 0 评论 -
oop test
Write declarations for the followinga pointer to a character;an array of 10 integers;a refernce to an array of 10 integers;a pointer to an array of character strings;a pointer to a pointer to a c...原创 2020-03-14 23:51:53 · 774 阅读 · 0 评论 -
软件工程概论第一章答案
软件工程概论第一章答案选择题一、单选题 (共10题,50分)1、软件的定义多种多样,现在一般认为软件定义中不包含A、 程序B、 数据C、 文档D、 界面正确答案: D解析:常见的软件定义是:程序+数据+文档2、哪类软件可以免费试用,但却不能获取源代码,进行适应性修改。A、 专属软件B、 免费软件C、 共享软件D、 自由软件正确答案: B解析:专属软件:通常不允许用户...原创 2020-03-21 15:43:43 · 467 阅读 · 0 评论