alibaba笔试

alibaba笔试

1.D 

A(7,7)/(A(3,3)A(2,2)) = 420

关联:

字符串的排列和组合:http://blog.csdn.net/hackbuteer1/article/details/7462447

2.A

#include <iostream>

class Base
{
public:
int Bar(char x) {
printf("Bar(char x)\n");
return (int) x;}
virtual int Bar(int x){
printf("virtual int Bar(int x)\n");
return (*x);}
}; class Derived: public Base
{
public:
int Bar(char x){
printf("Derived Bar(char x)\n");
return (int)(-x);}
int Bar(int x) {
printf("Derived Bar(int x)\n");
return (x/);}
}; void main()
{
Derived Obj;
Base *pObj = &Obj;
printf("%d\n", Obj.Bar((char)()));
printf("%d\n", Obj.Bar());
printf("%d\n", pObj->Bar((char)()));
printf("%d\n", pObj->Bar());
system("pause");
}

关联:

c++继承:公有,私有,保护:http://www.cnblogs.com/qlwy/archive/2011/08/25/2153584.html

c++  与Java的继承区别之一:http://hankjin.blog.163.com/blog/static/3373193720109892556114/

3.C

4.C

关联:

线性表:http://baike.baidu.com/view/178622.htm

关联数组:http://zh.wikipedia.org/wiki/%E5%85%B3%E8%81%94%E6%95%B0%E7%BB%84

类似于python中的字典

上一篇:Segment Tree Beats 区间最值问题


下一篇:HDU5086:Revenge of Segment Tree(规律题)