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 |
|