智力题集锦介绍
1.烧一根不均匀的绳子,从头烧到尾总共需要1个小时,问如何用烧绳子的方法来确定半小时的时间呢?
2.10个海盗抢到了100颗宝石,每一颗都一样大小且价值连城。他们决定这么分:
(1)抽签决定自己的号码(1~10);
(2)首先,由1号提出分配方案,然后大家表决,当且仅当超过半数的人同意时,按照他的方案进行分配,否则将被扔进大海喂鲨鱼;
(3)如果1号死后,再由2号提出分配方案,然后剩下的4个人进行表决,当且仅当超过半数的人同意时,按照他的方案进行分配,否则将被扔入大海喂鲨鱼;
(4)依此类推……
条件:每个海盗都是很聪明的人,都能很理智地做出判断,从而做出选择。
问题:第一个海盗提出怎样的分配方案才能使自己的收益最大化?
3.为什么下水道的盖子是圆的?
4.中国有多少辆汽车?
5.你让工人为你工作7天,回报是一根金条,这根金条平分成相连的7段,你必须在每天结束的时候给他们一段金条。如果只允许你两次把金条弄断,你如何给你的工人付费?
6.有一辆火车以每小时15公里的速度离开北京直奔广州,同时另一辆火车以每小时20公里的速度从广州开往北京。如果有一只鸟,以30公里每小时的速度和两辆火车同时启动,从北京出发,碰到另一辆车后就向相反的方向返回去飞,就这样依次在两辆火车之间来回地飞,直到两辆火车相遇。请问,这只鸟共飞行了多长的距离?
7.你有两个罐子以及50个红色弹球和50个蓝色弹球,随机选出一个罐子,随机选出一个弹球放入罐子,怎样给出红色弹球最大的选中机会?在你的计划里,得到红球的几率是多少?
8.想像你站在镜子前,请问,为什么镜子中的影像可以左右颠倒,却不能上下颠倒呢?
9.如果你有无穷多的水,一个3公升的提捅,一个5公升的提捅,两只提捅形状上下都不均匀,问你如何才能准确称出4公升的水?
10.你有一桶果冻,其中有黄色、绿色、红色三种,闭上眼睛抓取同种颜色的两个。抓取多少次就可以确定你肯定有两个同一颜色的果冻?
11.连续整数之和为1000的共有几组?
12.从同一地点出发的相同型号的飞机,可是每架飞机装满油只能绕地球飞半周,飞机之间可以加油,加完油的飞机必须回到起点。问至少要多少架次,才能满足有一架绕地球一周。
参考答案:
1.两边一起烧。
2.96,0,1,0,1,0,1,0,1,0。
3.因为口是圆的。
4.很多。
5.分1,2,4。
6.6/7北京到广州的距离。
7.100%。
8.平面镜成像原理(或者是“眼睛是左右长的”)。
9.3先装满,倒在5里,再把3装满,倒进5里。把5里的水倒掉,把3里剩下的水倒进5里,再把3装满,倒进5里,ok!
10.一次。
11.首先1000为一个解。连续数的平均值设为x,1000必须是x的整数倍。假如连续数的个数为偶数个,x就不是整数了。x的2倍只能是5,25,125才行。因为平均值为12.5,要连续80个达不到。125/262.5是可以的。即62,63,61,64,等等。连续数的个数为奇数时,平均值为整数。1000为平均值的奇数倍。10002×2×2×5×5×5;x可以为2,4,8,40,200排除后剩下40和200是可以的。所以答案为平均值为62.5,40,200,1000的4组整数。
12.答案是5架次。一般的解法可以分为如下两个部分:
(1)直线飞行
一架飞机载满油飞行距离为1,n架飞机最远能飞多远?在不是兜圈没有迎头接应的情况,这问题就是n架飞机能飞多远?存在的极值问题是不要重复飞行,比如两架飞机同时给一架飞机加油且同时飞回来即可认为是重复,或者换句话说,离出发点越远,在飞的飞机就越少,这个极值条件是显然的,因为n架飞机带的油是一定的,如重复,则浪费的油就越多。比如最后肯定是只有一架飞机全程飞行,注意“全程”这两个字,也就是不要重复的极值条件。如果是两架飞机的话,肯定是一架给另一架加满油,并使剩下的油刚好能回去,就说第二架飞机带的油耗在3倍于从出发到加油的路程上,有三架飞机第三架带的油耗在5倍于从出发到其加油的路程上,所以n架飞机最远能飞行的距离为s1+1/3+…+1/(2n+1)这个级数是发散的,所以理论上只要飞机足够多最终可以使一架飞机飞到无穷远,当然实际上不可能一架飞机在飞行1/(2n+1)时间内同时给n1个飞机加油。
(2)可以迎头接应加油
一架飞机载满油飞行距离为1/2,最少几架飞机能飞行距离1?也是根据不要重复飞行的极值条件,得出最远处肯定是只有一架飞机飞行,这样得出由1/2处对称两边1/4肯定是一架飞机飞行,用上面的公式即可知道一边至少需要两架飞机支持,(1/3+1/5)/2>1/4(左边除以2是一架飞机飞行距离为1/2),但是有一点点剩余,所以想像为一个滑轮(中间一个飞机是个绳子,两边两架飞机是个棒)的话,可以滑动一点距离,就说加油地点可以在一定距离内变动(很容易算出来每架飞机的加油地点和加油数量,等等)
数学篇
1.1000!有几位数,为什么?
2.F(n) 1 n>8 n<12
F(n) 2 n<2
F(n) 3 n 6
F(n)4 n other
使用+ * /和sign(n)函数组合出F(n)函数
sign(n) 0 n 0
sign(n)1 n<0
sign(n) 1 n>0
3.编一个程序求质数的和,例如F(7) 1+3+5+7+11+13 +17 57。
逻辑推理题
1.此题源于1981年柏林的德国逻辑思考学院,98%的测验者无法解答此题。
有五间房屋排成一列;所有房屋的外表颜色都不一样;所有的屋主来自不同的国家;所有的屋主都养不同的宠物;喝不同的饮料;抽不同的香烟。
(1)英国人住在红色房屋里;(2)瑞典人养了一只狗;(3)丹麦人喝茶;(4)绿色的房子在白色的房子的左边;(5)绿色房屋的屋主喝咖啡;(6)吸Pall Mall香烟的屋主养鸟;(7)黄色屋主吸Dunhill香烟;(8)位于最中间的屋主喝牛奶;(9)挪威人住在第一间房屋里;(10)吸Blend香烟的人住在养猫人家的隔壁;(11)养马的屋主在吸Dunhill香烟的人家的隔壁;(12)吸Blue Master香烟的屋主喝啤酒;(13)德国人吸Prince香烟;(14)挪威人住在蓝色房子隔壁;(15)只喝开水的人住在吸Blend香烟的人的隔壁
问:谁养鱼?
提示:首先确定
房子颜色:红、黄、绿、白、蓝 Color 1 2 3 4 5
国籍:英、瑞、丹、挪、德=> Nationality 1 2 3 4 5
饮料:茶、咖、奶、酒、水=> Drink 1 2 3 4 5
烟:PM、DH、BM、PR、混=> Tobacco 1 2 3 4 5
宠物:狗、鸟、马、猫、鱼=> Pet 1 2 3 4 5
然后有:
(9)=>N1=挪威
(14)=>C2=蓝
(4)=>如C3=绿,C4=白,则(8)和(5)矛盾,所以C4=绿,C5=白
剩下红黄只能为C1,C3
(1)=>C3=红,N3=英国,C1=黄
(8)=>D3=牛奶
(5)=>D4=咖啡
(7)=>T1=DH
(11)=>P2=马
那么:
挪威 ? 英国 ? ?
黄 蓝 红 绿 白
? ? 牛奶 咖啡 ?
DH ? ? ? ?
? 马 ? ? ?
(12)=>啤酒只能为D2或D5,BM只能为T2或T5=>D1=矿泉水
(3)=>茶只能为D2或D5,丹麦只能为N2或N5
(15)=>T2=混合烟=>BM=T5,
所以剩下啤酒=D5,茶=T2=>丹麦=D2
然后:
挪威 丹麦 英国 ? ?
黄 蓝 红 绿 白
矿泉水 茶 牛奶 咖啡 啤酒
DH 混合烟 ? ? BM
? 马 ? ? ?
(13)=>德国=N4,PR=T4
所以,瑞典=N5,PM=T3
(2)=>狗=P5
(6)=>鸟=P3
(10)=>猫=P1
得到:
挪威 丹麦 英国 德国 瑞典
黄 蓝 红 绿 白
矿泉水 茶 牛奶 咖啡 啤酒
DH 混合烟 PM PR BM
猫 马 鸟 ? 狗
所以,最后剩下的鱼只能由德国人养了。
2.
. . .
. . .
. . .
请仅用一笔画四根直线,将上图9个点全部连接。
3.对一批编号为1~100全部开关朝上(开)的灯进行以下操作:
凡是1的倍数反方向拨一次开关;2的倍数反方向又拨一次开关;3的倍数反方向又拨一次开关……
问:最后为关熄状态的灯的编号。
微软招聘总经理助理的三道面试题
1.某手机厂家由于设计失误,有可能造成电池寿命比原来设计的寿命短一半(不是冲放电时间),解决方案就是更换电池或给50元购买该厂家新手机的折换券。请给所有已购买的用户写信告诉解决方案。
2.一高层领导在参观某博物馆时,向博物馆馆员小王要了一块明代的城砖作为纪念,按国家规定,任何人不得将博物馆收藏品变为私有。博物馆馆长需要如何写信给这位领导,将城砖取回?
3.王小姐由于工作失误,将2万元的笔记本电脑以1.2万元错卖给李先生,王小姐的经理应该怎么写信给李先生将钱要回?
英文面试题目
1. Algorithms
* What’s the difference between a linked list and an array?
* Implement an algorithm to sort a linked list. Why did you pick the method you did?
* Implement an algorithm to sort an array. Why did you pick the method you did?
* Implement strstr() (or some other string library function).
* Reverse a string. Optimize for speed. Optimize for space.
* Count the number of set bits in a number. Now optimize for speed. Now optimize for size.
* How would you find a cycle in a linked list?
* Give me an algorithm to shuffle a deck of cards, given that the cards are stored in an array of ints.
* Write a function that takes in a string parameter and checks to see whether or not it is an integer, and if it is then return the integer value.
* Write a function to print all of the permutations of a string.
* Implement malloc.
* Write a function to print the Fibonacci numbers.
* Write a function to copy two strings, A and B. The last few bytes of string A overlap the first few bytes of string B.
* How would you print out the data in a binary tree, level by level, starting at the top?
2. Applications
* How can computer technology be integrated in an elevator system for a hundred story office building? How do you optimize for availability? How would variation of traffic over a typical work week or floor or time of day affect this?
* How would you redesign an ATM?
* Suppose we wanted to run a microwave oven from the computer. What kind of software would you write to do this?
* How would you design a coffee-machine for an automobile.
3. Thinkers
* How are M&Ms made?
* If you had to learn a new computer language, how would you go about doing it?
* If MS told you we were willing to invest $5 million in a start up of your choice, what business would you start? Why?
* If you could gather all of the computer manufacturers in the world together into one room and then tell them one thing that they would be compelled to do,what would it be?
* Explain a scenario for testing a salt shaker.
* If you are going to receive an award in 5 years, what is it for and who is the audience?
* How would you explain how to use Microsoft Excel to your grandma?
* Why is it that when you turn on the hot water in any hotel, for example, the hot water comes pouring out almost instantaneously?
微软亚洲技术支持中心面试题目
1.进程和线程的差别。
2.Heap与stack的差别。
3.Windows下的内存是如何管理的?
4.介绍.Net和.Net的安全性。
5.客户端如何访问.Net组件实现Web Service?
6.C/C++编译器中虚表是如何完成的?
7.谈谈COM的线程模型。然后讨论进程内/外组件的差别。
8.谈谈IA32下的分页机制。
9.给两个变量,如何找出一个带环单链表中是什么地方出现环的?
10.在IA32中一共有多少种办法从用户态跳到内核态?
11.如果只想让程序有一个实例运行,不能运行两个。像winamp一样,只能开一个窗口,怎样实现?
12.如何截取键盘的响应,让所有的‘a’变成‘b’?
13.Apartment在COM中有什么用?为什么要引入?
14.存储过程是什么?有什么用?有什么优点?
15.Template有什么特点?什么时候用?
16.谈谈Windows DNA结构的特点和优点。
微软研究院笔试题目
1.#include <stdio.h>
#include <String.h>
class CBuffer
{
char * m_pBuffer;
int m_size;
publc:
CBuffer()
{
m_pBuffer=NULL;
}
~CBuffer()
{
Free();
}
void Allocte(int size)
{
m_size=size;
m_pBuffer= new char[size];
}
private:
void Free()
{
if(m_pBuffer!=NULL)
{
delete m_pBuffer;
m_pBuffer=NULL;
}
}
public:
void SaveString(const char* pText) const
{
strcpy(m_pBuffer, pText);
char* GetBuffer() const
{
return m_pBuffer;
}
};
void main (int argc, char* argv[])
{
cBuffer buffer1;
buffer1.SaveString(“Microsoft”);
printf(buffer1.GetBuffer());
}
}
找出Allocate, SaveString, main的错误。
2.打印“Welcome MSR Asia”
#include <stdio.h>
#include <string.h>
char * GetName (void)
{
//To return “MSR Asia” String
char name[]=“MSR Asia”;
return name;
}
void main(int argc, char* argv[])
{
char name[32];
//Fill in zeros into name
for(int i=0;i<=32;i++)
{
name[1]=‘\0‘;
}
//copy “Welcome” to name
name=“Welcome”;
//Append a blank char
name[8]=”;
//Append string to name
strcat(name,GetName());
//print out
printf(name);
}
找出程序中的错误。
3.#include <stdio.h>
class A
{
public:
void FuncA()
{
printf(“FuncA called\n”);
}
virtual void FuncB()
{
printf(“FuncB called\n”);
}
};
class B: public A
{
public:
void FuncA()
{
A::FuncA();
printf(“FuncAB called\n”);
}
virtual void FuncB()
{
printf(“FuncBB called\n”);
}
};
void main(void)
{
B b;
A *pa;
pa=&b;
A *pa2=new A;
b.FuncA();
b.FuncB();
pa->FuncA();
pa->FuncB();
pa2->FuncA();
pa2->FuncB();
delete pa2;
}
What is the output of the above program?
4.#include <stdio.h>
#include <string.h>
int FindSubString(char* pch)
{
int count=0;
char* p1=pch;
while(*p1!=‘\0’)
{
if(*p1==p1[1]-1)
{
p1++;
count++;
}
else
{
break;
}
}
int count2=count;
while(*p1!=‘\0’)
{
if(*p1!==p1[1]+1)
{
p1++;
count2--;
}
else
{
break;
}
if(count2==0)
return count;
return 0;
}
void ModifyString(char* pText)
{
char* p1=pText;
char* p2=p1;
while(*p1!=‘\0’)
{
int count=FindSubString(p1);
if(count>0)
{
*p2++=*p1;
sprintf(p2, “%I”, count);
while(*p2!= ‘\0’)
{
p2++;
}
p1+=count+count+1;
}
else
{
*p2++=*p1++;
}
}
}
void main(void)
{
char text[32]=“XYBCDCBABABA”;
ModifyString(text);
printf(text);
}
In the main() function, after ModifyString(text) is called, what’s the value of ‘text’?
微创笔试题目(微创,微软在中国的合资公司)
1.上海的苏州河由于遭受多年的工业污染,一直是条臭水沟。上海市政府下了很大决心清理苏州河,你觉得需要几年能让河水变清?你的依据是什么?
2.找出字符串A中包含的字符可以进行的所有不同组合。例如:abccd中,ab,ac,bc,cc,abd等都是可能的组合。(请用C/C++编程,不允许上机操作)
3.请估算月球的体积。
4.经常去的技术网站,请举例。
5.对软件开发过程的理解。
6.上海有多少外籍和港澳台人士?你的依据是什么?(不得引用政府和调研机构数据)
7.字符串A是由n个小写英文字母(a ~ z)构成的,定义为char A[n]。你能用更少的空间表示这个字符串吗?请写出从char A[n]到你的新的储存格式的转换函数。(请用C/C++编程,不允许上机操作)
8.哈希表和数组的定义,区别,优缺点。
9.用递归实现菲波列数列。
10.用dhtml写页面。
11.一楼到十楼的每层电梯门口都放着一颗钻石,钻石大小不一。你乘坐电梯从一楼到十楼,每层楼电梯门都会打开一次,只能拿一次钻石,问怎样才能拿到最大的一颗? (去年应聘到微创的S小姐面试遇到的就是这道智力题。她的回答是:选择前五层楼都不拿,观察各层钻石的大小,做到心中有数。后五层楼再选择,选择大小接近前五层楼出现过最大钻石大小的钻石。她至今也不知道这道题的准确答案,“也许就没有准确答案,就是考一下你的思路,”她如是说。)
12.U2合唱团在17分钟内得赶到演唱会场,途中必需跨过一座桥,四个人从桥的同一端出发,你得帮助他们到达另一端,天色很暗,而他们只有一只手电筒。一次同时最多可以有两人一起过桥,而过桥的时候必须持有手电筒,所以就得有人把手电筒带来带去,来回桥两端。手电筒是不能用丢的方式来传递的。四个人的步行速度各不同,若两人同行则以较慢者的速度为准。Bono需花1分钟过桥,Edge需花2分钟过桥,Adam需花5分钟过桥,Larry需花10分钟过桥。他们要如何在17分钟内过桥呢?(有个同济的学生写文章说他当时在微软面试时就是碰到了这道题,最短只能做出在19分钟内过桥,微软的人对他讲这样的结果已经是不错的了!)
13.烧一根不均匀的绳要用一个小时,如何用它来判断半个小时?(参考答案:两边一起烧)
14.为什么下水道的盖子是圆的?(从复旦大学一位计算机系教授那里听来的答案:因为如果是方的、长方的或椭圆的,那无聊之徒拎起来它就可以直接扔进地下道啦!但圆形的盖子嘛,就可以避免这种情况了)
15.有7克、2克砝码各一个,天平一只,如何只用这些物品三次将140克的盐分成50、90克各一份?
Intel笔试面试题目
智力题
1.每天中午从法国塞纳河畔的勒阿佛有一艘轮船驶往美国纽约,在同一时刻纽约也有一艘轮船驶往勒阿佛。已知横渡一次的时间是7天7夜,轮船匀速航行,在同一航线,轮船近距离可见。
请问今天中午从勒阿佛开出的船会遇到几艘从纽约来的船?
2.巴拿赫病故于1945年8月31日。他的出生年份恰好是他在世时某年年龄的平方,问:他是哪年出生的?
答案:
设他在世时某年年龄为x,则x的平方<1945,且x为自然数。其出生年份x的平方xx(x1),他在世年龄1945x(x1)。1945的平方根44.1,则x应为44或略小于此的数。而x44时,x(x1)44×431892,算得其在世年龄为1945189253;又x43时,x(x1)43×421806,得其在世年龄为19451806139;若x再取小,其在世年龄越大,显然不妥。故x44,即他出生于1892年,终年53岁。
3.
(图形描述:一个各边相等的十字图案)
上图中各边相等,要求:用最少的分割,拼成一个正方形。
笔试题目
1.设计一个重采样系统,说明如何anti-alias。
2.y1(n)x(2n),y2(n)x(n/2),问:
如果y1为周期函数,那么x是否为周期函数?
如果x为周期函数,那么y1是否为周期函数?
如果y2为周期函数,那么x是否为周期函数?
如果x为周期函数,那么y2是否为周期函数?
3.如果模拟信号的带宽为5kHz,要用8k的采样率,怎么办。
4.某个程序在一个嵌入式系统(200M的CPU,50M的SDRAM)中已经最优化了,换到另一个系统(300M的CPU,50M的SDRAM)中运行,还需要优化吗?
5.x^4+a*x^3+x^2+c*x+d最少需要做几次乘法。
6.三个float:a,b,c
问值:
(a+b)+c(b+a)+c
(a+b)+c(a+c)+b
7.把一个链表反向填空。
8.下面哪种排序法对12354最快? 。
A. quick sort
B. buble sort
C. merge sort
9.哪种结构平均来讲获取一个值最快? 。
A. binary tree
B. hash table
C. stack
10.
#include “stdafx.h”
#include <iostream.h>
struct bit
{ int a:3;
int b:2;
int c:3;
};
int main(int argc, char* argv[])
{ bit s;
char *c = (char*)&s;
*c = 0x99;
cout << s.a <<endl <<s.b<<endl<<s.c<<endl;
return 0;
}
Output:?
11.
挑bug,在linux下运行:
#include <stdio.h>
char *reverse(char* str)
{
int len=0, i=0;
char *pstr=str, *ptemp,*pd;
while(*++pstr)
len++;
pstr--;
//ptemp=(char*)malloc(len+1);
ptemp=(char*)malloc(len+1);
pd=ptemp;
while(len--){
*ptemp=*pstr;
ptemp++;
pstr--;
i++;
}
*ptemp=*pstr;
ptemp++;
*ptemp=‘\0’;
return pd;
}
main()
{
char string[40]= “Hello World!”;
char *pstr=string;
printf(“%s”, pstr);
printf(“%s”, reverse(pstr));
}
实验室笔试题
1.写出下列信号的奈亏斯特频率
(1)f(t)1cos(2000pait)sin(4000pait)
(2)f(t)sin(4000pait)/pait
(3)f(t)(sin(4000pait)的平方)/pait
2.有两个线程
void producer()
{
while(1)
{
GeneratePacket();
PutPacketIntoBuffer();
Signal(customer);
}
}
void customer()
{
while(1)
{
WaitForSignal();
if(PacketInBuffer>10)
{
ReadAllPackets();
ProcessPackets();
}
}
}
(1)有没有其他方法可以提高程序的性能
(2)可不可以不使用信号之类的机制来实现上述的功能
3.优化下面的程序
(0)sum0
(1)I1
(2)T14*I
(3)T2address(A)4
(4)T3T2[T1]
(5)T4address(B)4
(6)T54*I
(7)T6T4[T5]
(8)T7T3*T5
(9)sumsum+T6
(10)II+1
(11)IF I<20 GOTO (2)
面试题目
1.下面这段代码不符合Pipeline要求,请你改动一下
if(a>b)
i0;
else
i1;
2.对于运行在ring3上的这个指令,请你指出CPU和操作系统分别参与了哪部分操作?
mov eax, [0x12345678]
3.如果有一个芯片,只是裸机,如何写它的操作系统?最难的部分在哪儿?如何解决?
4.如何写一个主板的BIOS?
5.没有操作系统来给你完成它的一些初始化工作,如何写出PCI的driver?
Intel 2004北京笔试题
问答题
1.你觉得C程序中为什么会有main(),有没有想过exit,return,或什么都不做也可以让程序正常终止?
2.TOTAL个人围一圈,从1开始数到N,谁数到N出圈,下一个人继续从1开始数,返回最后一个出局的人。
#define TOTAL 15;
int xxxx(int N)
{
int ring[TOTAL] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1} //全是1
int nextstart = 0, counter=0;
for (i =1; i<TOTAL; i++){
counter = 0;
while(counter <N) {
if (_______________)
( ;)
else
(____________;)
}
ring[nextstart]=0
}
return nextstart +1;
}
3.列举Intel四种架构
4.概率题
(1)x, y为随机变量,联合概率密度f(x,y) intig(0,1)* dx*intig(0,x)*k*dy,k为常数,求k? E(xy) ?
注:intig(a,b)为a到b的定积分。
(2)A,B为随机事件,以下哪个正确 。
A.P(A U B)*p(AB) < P(A)P(B)
B.P(A U B)*p(AB) > P(A)P(B)
C.P(A U B)*p(AB) < P(A) + P(B)
D.P(A U B)*p(AB) > P(A) + P(B)
5.信道带宽200kHz,信噪比10dB,求信道波特率?
6.以下代码运行结果是 。
int main()
{
int a,b,c,abc = 0;
a=b=c=40;
if(c)
{
int abc;
abc = a*b+c;
}
printf(“%d,%d”, abc, c);
return 0;
}
7.给出了从纽约出发和到达洛杉机的各种航班信息,写出找到一条从纽约到洛杉机的最短距离的航班组合的代码。
8.从计算机图形上截取某个物体边缘的若干个坐标,求这个物体的面积,并判断是方形还是圆形,说明原因。
9.离散卷机与DFT的区别与关系。快速求出不满足2^N长度的离散傅立叶变换的方法有哪些?如何用fft求N*M点的离散卷机?
10.给出fir和iir的优缺点。
11.如何计算线性标量量化器的量化噪声?需要哪些假设?
IBM
IBM笔试题目
字母矩阵题目(15分钟)
给你一个矩阵:
(一) (二) (三) (四) (五)
1 a b c d e
2 b c a e d
3 c b e a d
4 c e d b a
5 e d a c b
回答以下问题。
(1)将第一行和第四行交换后,第一行第四个字母下面的左边的下面的右边的字母是 。
①a ②b ③c ④d ⑤e
(2)将所有出现在d左边的字母从矩阵中删掉。将所有出现在a左边的c字母从矩阵中删掉。如果矩阵中剩下的字母的种类的数目大于3,答案为原矩阵中左上方至右下方对角线上出现两次的字母。如果矩阵中剩下的字母的种类的数目小于或者等于3,答案为原矩阵中右上至左下对角线上出现4次的字母是 。
①a ②b ③c ④d ⑤e
(3)将所有的a用4替换,所有的d用2替换,哪一列的总和 最大
①第1列 ②第2列 ③第3列 ④第4列 ⑤第五列
(4)从左上角的字母开始,顺时针沿矩阵外围,第4次出现的字母是 。
①a ②b ③c ④d ⑤e
(5)沿第5列从上到下,接着沿第3列从下到上,接着沿第4列从上到下,接着沿第1列从下到上,接着沿第2列从上到下,第1个出现5次的字母是 。
①a ②b ③c ④d ⑤e
(6)从左上角的字母开始,顺时针沿矩阵外围,第4次出现的字母是以下哪个 。
①a ②b ③c ④d ⑤e
智力题
1.有50家人家,每家一条狗。有一天警察通知,50条狗当中有病狗,行为和正常狗不一样。每人只能通过观察别人家的狗来判断自己家的狗是否生病,而不能看自己家的狗,如果判断出自己家的狗病了,就必须当天一枪打死自己家的狗。结果,第一天没有枪声,第二天没有枪声,第三天开始一阵枪响,问:一共死了几条狗?
2.已知两个数字为1~30之间的数字,甲知道两数之和,乙知道两数之积,甲问乙:“你知道是哪两个数吗?”乙说:“不知道”。乙问甲:“你知道是哪两个数吗?”甲说:“也不知道”。于是,乙说:“那我知道了”,随后甲也说:“那我也知道了”,这两个数是什么?
3.一个经理有三个女儿,三个女儿的年龄加起来等于13,三个女儿的年龄乘起来等于经理自己的年龄。有一个下属已知道经理的年龄,但仍不能确定经理的三个女儿的年龄,这时经理说只有一个女儿的头发是黑的,然后这个下属就知道了经理的三个女儿的年龄。请问三个女儿的年龄分别是多少?为什么?
答案:
1.死了3条(第几天枪响就有几条)。
简单分析:从有一条不正常的狗开始,显然第一天将会听到一声枪响。这里的要点是你只需站在那条不正常狗的主人的角度考虑。
有两条的话思路继续,只考虑有两条不正常狗的人,其余人无需考虑。通过第一天他们了解了对方的信息。第二天杀死自己的狗。换句话说每个人需要一天的时间证明自己的狗是正常的。有三条的话,同样只考虑那三个人,其中每一个人需要两天的时间证明自己的狗是正常的狗。
2.1和4,或者4和7。
3.分别是2,2,9。
简单分析:
1 1 11 11 伪穷举,呵呵
1 2 10 20
1 3 9 27
1 4 8 32
1 5 7 35
1 6 6 36 在所有的可能性中,只有这两个相同,如果经理的年龄为其他,则他下属就可以确定三个人分别为几岁了
2 2 9 36 所以只有两种可能:1,6,6或者2,2,9。如果是1,6,6的话,那么两个同样大的6岁的孩子应该都是黑头发
2 3 8 40 所以只有2,2,9比较合理,大的那个是黑头发,另外两个是黄毛丫头
2 4 7 56
2 5 6 60
3 3 7 42
3 4 6 72
3 5 5 75
4 4 5 80
社会招聘笔试题
1.一个粗细均匀的长直管子,两端开口,里面有4个白球和4个黑球,球的直径、两端开口的直径等于管子的内径,现在白球和黑球的排列是wwwwbbbb,要求不取出任何一个球,使得排列变为bbwwwwbb。
2.一只蜗牛从井底爬到井口,每天白天蜗牛要睡觉,晚上才出来活动,一个晚上蜗牛可以向上爬3尺,但是白天睡觉的时候会往下滑2尺,井深10尺,问蜗牛几天可以爬出来?
3.在一个平面上画1999条直线最多能将这一平面划分成多少个部分?
4.在太平洋的一个小岛上生活着土人,他们不愿意被外人打扰,一天,一个探险家到了岛上,被土人抓住,土人的祭司告诉他,你临死前还可以有一个机会留下一句话,如果这句话是真的,你将被烧死,是假的,你将被五马分尸,可怜的探险家如何才能活下来?
5.怎样种四棵树使得任意两棵树的距离相等。
6.27个小运动员在参加完比赛后,口渴难耐,去小店买饮料,饮料店搞促销,凭三个空瓶可以再换一瓶,他们最少买多少瓶饮料才能保证一人一瓶?
7.有一座山,山上有座庙,只有一条路可以从山上的庙到山脚,每周一早上8点,有一个聪明的小和尚去山下化缘,周二早上8点从山脚回山上的庙里,小和尚的上下山的速度是任意的,在每个往返中,他总是能在周一和周二的同一钟点到达山路上的同一点。例如,有一次他发现星期一的8点30和星期二的8点30他都到了山路靠山脚的3/4的地方,问这是为什么?
8.有两根不均匀分布的香,每根香烧完的时间是一个小时,你能用什么方法来确定一段15分钟的时间?
英文面试题目
1. Describe your greatest achievement in the past 4-5 years?
2. What are your short & long term career objectives? What do you think is the most ideal job for you?
3. Why do you want to join IBM? What do you think you can contribute to IBM?
宝洁公司(P&G)面试题目
宝洁公司招聘题号称由高级人力资源专家设计,无论您如实或编造回答,都能反应您某一方面的能力。核心部分的题目如下:
Please provide concise examples that will help us better understand your capabilities.
1. Describe an instance where you set your sights on a high/demanding goal and saw it through completion.
2. Summarize a situation where you took the initiative to get others going on an important task or issue, and played a leading role to achieve the results you wanted.
3. Describe a situation where you had to seek out relevant information, define key issues, and decide on which steps to take to get the desired results.
4. Describe an instance where you made effective use of facts to secure the agreement of others.
5. Give an examples of how you worked effectively with people to accomplish an important result.
6. Describe a creative/innovative idea that you produced which led to a significant contribution to the success of an activity or project.
7. Provide an example of how you assessed a situation and achieved good results by focusing on the most important priorities.
8. Provide and example of how you acquired technical skills and converted them to practical application
解答范例:
1. Demnding Goal: To design a musical and dramatic show to celebrate the centennial Anniversary of Tianjin University.
The person who reach this goal: Chairman of Tianjin University Student Union What I learned from this observation: It is not necessary for a true leader to be an expert in such or such field of his career. But he must possessthe charismatic and the capacity to drive different people, who have diverging opinions, or even conflicting interests, to proceed togother to the sameorganizational goal.
2. The activity I initiated: To organize a group to sing English anthems on Charistmas Eve, visit all domitories in university and send christmas gifts on behalf of our English Association The desired result: To broaden the students’ horizons about Western culture.
My leading role: Combine the representatitives’ suggestions with my idea and draw the decision on:
* What songs to play?
* Who could attend the choir?
* Which spots we performed on?
The result: Many students said that they felt the warmness we sent to them and they hoped we would hold such activities next Charistmas.
3. Background: I organized the first activity after the establishment of the Management School English Association.
The desired result: To help the freshmen and the sophomores with their English while publicizing our group.
Key issue:
* What aspect of the students’ English abilities needed refining? Relevant Information:
* What kind of entertainment was popular among students and also offered chances for them to learn English most effectively?
* Which foreign teacher was suitable for this position?
* When was our member free?
* Whch place was convenient for most attendances?
* Other related factors, such as the availibility of facilities and the layout of the spots.
4. Background: I advanced a plan to found an English Garden in collaboration with fraternal association in neighboring university.
The disagreement:
* The authority of our school may dissent.
* The cost was expensive, and we had no enough human resoure to carry on this project.
* There were too many English corners. Another one was unneccessaty. The facts I made use:
* Our dean approved this proposal.
* Our partner was willing to provide financial assistantship. And our members volunteered to design the details of the plan and implement it.
* The poll showed that the current English corners did not meet the students’ requirement and lacked uniqueness. The result: Others were convinced and we founded the English Garden successfully.
5. Background: In the military training, we hold a Military Songs Competition.
Working procedure:
Design: I cooperated with my collegues to figure out the climax of the performance, the musical accompaniment of the songs and the whole arrnagement ofthe narrative poem.
Rehearsal: I worked together with those who were in charge of the lights, sounds and scenes to create the perfect artistic effect.
On stage: I reminded my fellows with gestures and eye expressions. Also, we coped with an emergency coherently.
The result: Our military team won the second prize in this competition.
6. Activity: To hold the Perspective Entrepreneur Contest.
The innovative idea I produced: To simulat a board meeting of a company, in which our candidates debated the feasibility of selling modern fitness equipment according to the market information they collected.
The result: The contest was hold based on my proposal.
7. Background: On one morning when our promotion month first began, I found that the inventories in some department stores were not adequate.
My assessment of the situation: The four promoting stores were not very far from each other, and the time they opened was not the same. It was possible to fetch some stock from another store and made up for it later.
The priorities: To satisfy the stocking demand of the store which had the largest number of customers.
8. Background: In the inverstigation of customers’ opinions about the taste of a new kind of beer, I found that the questionnaire form was out of date and limited the freedom of the responsers’ choices.
Technical skills: The scientific arrangement of questionnaire form
The result: With the help the converted form, our company obtained more objective and effective information.
飞利浦笔试试题
1.用逻辑门和cmos电路实现ab+cd。
2.用一个二选一mux和一个inv实现异或。
3.给了reg的setup和hold时间,求中间组合逻辑的delay范围。
4.如何解决亚稳态。
5.用Verilog/VHDL写一个fifo控制器。
6.用Verilog/VDDL检测stream中的特定字符串。
阿尔卡特(中国)的面试题目
全部用C语言完成:
1.自己定义数据结构,写出程序:在一个单向链表中,往I位置插入一个节点。
2.自己定义数据结构,写出程序:二叉树的前序遍历。
3.不允许使用系统时间,写出一个随机数生成函数。
Google
这次是连环游戏,每一题的答案将在下一题中用到。
1、{first 10-digit prime found in consecutive digits e}.com.
e中出现的连续的第一个10个数字组成的质数。
2、7427466391.com
Congratulations,Youve made it to level 2. Go to www.Linux.org and enter Bobsyouruncle as the login and the answer to this equation as the password.
f(1)=7182818284
f(2)=8182845904
f(3)=8747135266
f(4)=7427466391
f(5)=__________
update:提示:f(1)到f(4)是e中连续的10个数字满足总和等于49的前4个,f(5)当然是让你搜索第5个咯,编个小程序吧。
答案:5966290435
3、www.Linux.org
4、www.google.com/labjobs/
via:
Google recruits eggheads with mystery billboard
Mysterious Billboard May Be Google Recruitment Ad
Myserious billboard
Google is behind mystery geek trap
写一句俳句来描述搜索流量季节性预测的可能方法。
用三种颜色为一个二十面体涂颜色,每面都要覆盖,你能够用多少种不同的涂法?你将选择哪三种颜色?
这是一个我们故意留给你你空白,请填充一些你喜欢的东西。
戴尔
I.Choose one question and write down the trouble shooting steps in English ( 4-5 steps )
1.Customer report his computer cannot start after sudden power lost. How will you trouble shoot and find out the cause of the failure.
2.One computer was used normally last day, but today, the user cannot connect to internet via dial-up networking.
3.Customer complain the system send out great noise. What’s the detail action to identify the faulty part?
4.My computer was suddenly disconnected from LAN, how to trouble shoot?
5.My computer was hung up. After reboot, only one cursor blinked on the upper-left corner. How to fix this problem.
II. Reading and translation:
Passage 1.
Customer called in and reported the battery weren’t charging, System LED indicator was in yellow.
1.Suggested customer remove the battery from the battery bay by sliding the latch at the bottom of Notebook. Checked the battery power level by pressing the check button on the battery. It indicated no power.
2.Suggested customer remove the CD ROM off the Media bay, then plug the Battery to the media bay, it was still same result.
3.Suggested customer try with other battery, in the battery bay and media bay, it was ok. Battery could be charged.
4.Requested customer provide the DSN number from the fail battery. CN-05H980-69502-21U-01GB.
Informed customer that we would send a replaced battery to her.
Passage 2.
Customer bought a Notebook 20 day ago, then discovered that when she adjusted the Brightness of the LCD, the LCD would turn to very dim. She must reboot the Notebook few times before the LCD might display normally.
1.Suggested her try gently apply pressure above the keyboard near the LEDS and power button.
2.Suggested her swivel the LCD back and forth and lightly tap the plastic back of LCD.
3.Suggested her gently apply pressure on the bezel surrounding the screen. the problem persisted, after these testing.
4.Requested customer to update BIOS and alter the LCD Brightness control setting in the BIOS. After checking BIOS the problem persisted.
I told customer we would have engineer onsite replace the LCD Panel.
Computer communications
Different kinds of computers use different methods, or protocols, to communicate with each other. Macintosh computers use the AppleTalk protocol. Macintosh as well as PCs can use TCP/IP to share information on the Internet. Some PCs require a Network Operating System (NOS) to communicate. For example, Novell Netware is a popular NOS with PC users.
意法半导体软件试题
A Test for The C Programming Language
I. History
1. C was originally designed for and implemented on the (what) operating system on the DEC PDP-11, by (who) .
2. The most recently approved ANSI/ISO C standard was issued in (when) , and single line comments notation “//” is or isn’t a feature of C89.
II. Syntax and Semantics
1. In a runtime C program, auto variables are stored in , static variables are stored in , and function parameters are stored in .
a. stack b. heap c. neither stack nor heap
2. The statement “extern int x;” is a , and the keyword extern is used during .
a. variable declaration b. variable definition
c. compilation time d. runtime
3. There is a complicated declaration: void ( * signal (int, void (*)(int)) ) (int);
If a statement “typedef void (*p) (int);” is given, please rewrite this complicated declaration.
4. The following code is a segment of C program.
..........
void func(int *p)
{...........}
..........
main()
{
int num=0;
.........
func(&num);
........
}
..........
Here, the function argument “&num” is passed .
a. by value b. by reference
III. Practice
Create a tree, which has h (h>0) layers, and its each node has w (w>0) sub-nodes.
Please complete the following incomplete solution.
#include <stdlib.h>
#include <string.h>
struct tree{
char info;
p_sub; //link to sub-nodes
};
// allocate memory and initiate
void dnode ( struct tree* tmp )
{
= malloc( sizeof (struct tree) );
= 0x41;
= NULL;
}
struct tree *dtree (struct tree* subtree, int height, int width)
{
int i;
if ( !subtree ) //if necessary, allocte memory for subtree
denode(subtree);
if ( height == 1 )
return subtree;
else if ( height == 2 ) {
struct tree *leaf = NULL;
for ( i=0; i<width; i++ ) {
denode ( );
;
leaf = NULL;
}
return subtree;
}
else {
for ( i=0; i<width; i++ ) {
}
return subtree;
}
}
main()
{
.........
struct tree *root = NULL;
root = dtree (root, h, w) ; // h and w are integers get from input
.........
}
Sony笔试题
1.完成下列程序
*
*.*.
*..*..*..
*...*...*...*...
*....*....*....*....*....
*.....*.....*.....*.....*.....*.....
*......*......*......*......*......*......*......
*.......*.......*.......*.......*.......*.......*.......*.......
#include <stdio.h>
#define N 8
int main()
{
int i;
int j;
int k;
---------------------------------------------------------
| |
| |
| |
---------------------------------------------------------
return 0;
}
2.完成程序,实现对数组的降序排序
#include <stdio.h>
void sort( );
int main()
{
int array[]={45,56,76,234,1,34,23,2,3}; //数字任//意给出
sort( );
return 0;
}
void sort( )
{
____________________________________
| |
| |
|-----------------------------------------------------|
}
3.费波那其数列,1,1,2,3,5……编写程序求第十项。可以用递归,也可以用其他方法,但要说明你选择的理由。
#include <stdio.h>
int Pheponatch(int);
int main()
{
printf("The 10th is %d",Pheponatch(10));
return 0;
}
int Pheponatch(int N)
{
--------------------------------
| |
| |
--------------------------------
}
4.下列程序运行时会崩溃,请找出错误并改正,并且说明原因。
#include <stdio.h>
#include <malloc.h>
typedef struct{
TNode* left;
TNode* right;
int value;
} TNode;
TNode* root=NULL;
void append(int N);
int main()
{
append(63);
append(45);
append(32);
append(77);
append(96);
append(21);
append(17); // Again, 数字任意给出
}
void append(int N)
{
TNode* NewNode=(TNode *