填空题

算法的复杂度主要包括______复杂度和空间复杂度。

【参考答案】

时间
<上一题 目录 下一题>
热门 试题

单项选择题
若有以下程序: #include <iostream> using namespace std; class A { private: int a; public: A(int i) { a=i; } void disp () { cout<<a<< , ; } }; class B { private: int b; public: B(int j) { b=j; } void disp () { cout<<b<< , ; } }; class C : public B,public A { private: int c; public: C(int k):A(k-2),B(k+2) { c=k; } void disp () { A::disp(); B::disp(); cout<<c<<endl; } }; int main() { C obj(10); obj.disp(); return 0; }
A.10,10,10
B.10,12,14
C.8,10,12
D.8,12,10
单项选择题
有以下程序; #include <iostream> using namespace std; class R { public: R(int r1,int r2) { R1=r1; R2=r2; } void print(); void print () const; private: int R1, R2; }; void R::print () { cout<<R1<< , <<R2<<endl; } void R::print() const { cout<<R1<< , <<R2<<endl; } int main () { R a(5,4); const R b(20,52); b.print(); return 0; } 执行后的输出结果是
A.5,4
B.20,52
C.0,0
D.4,5
相关试题
  • 下面是复数类complex的定义,其中作为友元...
  • 有以下程序:#include <iostream>using...
  • 有以下程序#include <iostream>using ...
  • 有以下程序#include <iostream>using ...
  • 下列程序的输出结果是______。#incl...