笔试面试 一、“给定资料3″中画线部分提到“成长的烦恼总是在成长中化解的",发展难免会带来新问题,而新问题是新发展的契机。请联系实际,自选角度,自拟题目,写—篇议论性文章。(50分) 要求:(1)观点明确,见解深刻;(2)参考”给定资料”,但不拘泥千”给定资料”; (3)思路清晰,语言流畅;(4)字数在1000字左右。
笔试面试 以下程序输出什么? #include <iostream> class ComponentA { public: ComponentA() { std::cout << "a"; } ~ComponentA() { std::cout << "~a"; } }; class ComponentB { public: ComponentB() { std::cout << "b"; throw std::exception(); } ~ComponentB() { std::cout << "~b"; } }; class ComponentC { public: ComponentC() { std::cout << "c"; } ~ComponentC() { std::cout << "~c"; } }; class Container { ComponentA m_a; ComponentB m_b; ComponentC m_c; public: Container() { std::cout << "d"; } ~Container() { std::cout << "~d"; } }; int main() { try { Container c; } catch (std::exception const &) { } return 0; }
笔试面试 给定下面程序段,则执行一次Fun(1,n)函数的时间复杂度为()。 int Fun(int l, int r) { if (r – l + 1 == 1){ for (int i = l; i <= r; i *= 2 ) for (int j = r; j >= l ; j — ) a[i] = a[i] * a[j]; return a[l] * a[r]; } int mid = (l + r) / 2; return f(l, mid) / f(mid + 1, r); }