由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - some interview questions i met and remembered
相关主题
[合集] some interview questions i met and rememberedC++里为什么没有标准化atoi和itoa?
two interview questions问个构造函数的问题
一道c++ 题, 找出duplicate numbersHow to convert ip to int using Python ? (转载)
这段代码为何要这样做?请教一道新奇的面试题
[合集] 如何只用putchar来实现itoa?a simple question
紧急求助,C语言面试题[合集] A C++ Constructor Question
An algorithm question[合集] Windows编程初级问题(二)
[合集] 偶写的itoa字符串变换的问题
相关话题的讨论汇总
话题: expension话题: remembered话题: number话题: met话题: questions
进入Programming版参与讨论
1 (共1页)
c********e
发帖数: 383
1
1) given the taylor seirous expension of sin(t), write the most effecient pr
ogram in c/c++ to calculate the result given a t and the number of expension
unit.
2) write code to implement itoa
3) painball game. 3 participants. A 90% chance of hiting target, B 75%, C 45
%. they are initially positioned at the verties of a equal latteral trangle.
the rule is they will all roll a fair dice once and got a number. Assuming
there is no duplicates, once each one got a number, their shooting sequence
is
t****t
发帖数: 6806
2
今天有空,我做一做好了
1,2太简单了
3.你是要数学分析呢还是写程序模拟
我从数学上分析一下
基本的关系:
a:如果X,Y对射,射中的机率是x,y,X先射,那么X胜的机率是x/(x+y-xy),Y胜的机率是(y-
xy)/(x+y-xy)(过程略),也就是胜率是x:(y-xy).可以看到先射的人占了很大的便宜.
b:如果XYZ三人对射,那就存在一个射击策略的问题.如果X射,那他肯定先试图干掉Y.如
果Y射,那他肯定先试图干掉X.但是如果Z射呢?不管他射X还是Y,如果中了,那另一个人就
可以先手打他,他almost 死定了.如果没中,而且X和Y两人死了一个,他就可以先下手为
强.所以他的最佳策略是不射(或者故意射不中).当然这违反体育精神,如果不允许的话,
他还是先射X的好.至于最后的胜率,顺序给定的话,算起来很容易我就不做了.
4.小学数学,floor(n/5)+floor(n/5/5)+floor(n/5/5/5)+...
5.没看懂
6,7我都不屑做了
8要问清楚啥是最短.是tilt次数最少还是球移动的距离最短.然后广度优先?如果尺寸不
大的话也可以dynamic program
1 (共1页)
进入Programming版参与讨论
相关主题
字符串变换的问题[合集] 如何只用putchar来实现itoa?
请问如何在球体表面均匀分布N个点(赠送包子) (转载)紧急求助,C语言面试题
Quick Q: data member class's dtor orderAn algorithm question
请帮忙看一个python string comparion的问题,有包子.[合集] 偶写的itoa
[合集] some interview questions i met and rememberedC++里为什么没有标准化atoi和itoa?
two interview questions问个构造函数的问题
一道c++ 题, 找出duplicate numbersHow to convert ip to int using Python ? (转载)
这段代码为何要这样做?请教一道新奇的面试题
相关话题的讨论汇总
话题: expension话题: remembered话题: number话题: met话题: questions