登录
首页 » Visual C++ » poj3941

poj3941

于 2013-07-16 发布 文件大小:1KB
0 251
下载积分: 1 下载次数: 2

代码说明:

  poj 3941 Hideyuki is allowed by his father Ujisato some 1000 yen bills every month for his pocket money. In the first day of every month, the number of bills is decided as follows. Ujisato prepares n pieces of m-sided dice and declares the cutback k. Hideyuki rolls these dice. The number of bills given is the sum of the spots of the rolled dice decreased by the cutback. Fortunately to Hideyuki, Ujisato promises him to give at least one bill, even if the sum of the spots does not exceed the cutback. Each of the dice has spots of 1 through m inclusive on each side, and the probability of each side is the same. In this problem, you are asked to write a program that finds the expected value of the number of given bills. (poj 3941 Hideyuki is allowed by his father Ujisato some 1000 yen bills every month for his pocket money. In the first day of every month, the number of bills is decided as follows. Ujisato prepares n pieces of m-sided dice and declares the cutback k. Hideyuki rolls these dice. The number of bills given is the sum of the spots of the rolled dice decreased by the cutback. Fortunately to Hideyuki, Ujisato promises him to give at least one bill, even if the sum of the spots does not exceed the cutback. Each of the dice has spots of 1 through m inclusive on each side, and the probability of each side is the same. In this problem, you are asked to write a program that finds the expected value of the number of given bills.)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Com_N
    本程序调用了微软自带的mscomm控件,实现com口的数据接收,读者可自行添加发送数据功能。内附mscomm.ocx控件及其注册方法,本程序是用的静态链接库,为的是能在没有vc库的机器上也可以运行,所以个头大了点。(Microsoft's own mscomm controls, I realize com data reception, readers can add their own functions to send data. Enclosing mscomm.ocx control and registration method, the procedure is used in the static link library, for the in the absence of vc for the machine can also run, giving the larger point.)
    2005-07-31 09:50:35下载
    积分:1
  • Ffilesystemdri
    文件系统过滤驱动开发代码,可用用于文件加密,保护硬盘数据的安全。 (The file system filter driver development code can be used for file encryption to protect the security of the hard disk data.)
    2012-09-15 16:55:47下载
    积分:1
  • 26-control-example-the-source-code
      26个VC++界面编程通用控件源代码实例:   如何获得指定点的控件指针   如何将编辑框中输入的字符转换为大写(小写)   如何设置和获得单选按钮的选中状态   如何设置和获得一组单选按钮的选中状态   如何设置列表控件的显示方式   如何设置组合框中列表框的宽度   如何实现带自动完成功能的组合框   如何实现位图按钮   如何使用滑块   如何使用进度条   如何使用列表框   如何使用旋转按钮   如何使用组合框   如何通过控件ID获得控件窗口指针   如何为控件添加工具提示   如何通过控件窗口指针获得控件ID   如何为控件添加工具提示   如何限制编辑框输入文本的长度   如何在按钮上显示图标   如何在列表控件中插入列   如何在列表框中添加水平滚动条   如何在组合框中显示文件列表 (26 a vc++ programming interface general control source code examples: How to get control of the pointer designated point How to edit box in of the input characters into capital (small) How to set up and get radio buttons selected state How to set up and get a group of selected state radio button How to set up the list control showing the way How to set up combo boxes the width of the list box How to realize the combination of complete function with automatic box How to realize a bitmap button How to use the slider How to use the progress bar How to use the list box How to use the rotating button How to use the combination box How to get control via the control ID window pointer How to add the tooltip control How to get control via the control window pointer ID How to add the tooltip control How to limit the length of the input text edit box How to button on the display icon How to insert listed in a list co)
    2011-06-28 16:05:44下载
    积分:1
  • Appendix26
    Icmp高级编程 代码在vc++6.0下调试通过(ICMP high-level programming code vc++ 6.0 debugging through)
    2008-08-21 17:20:39下载
    积分:1
  • jfsms
    说明:  短信预付费平台源码,数据库基于SQLSERVER,含全套文档(The source code of the SMS prepaid platform, the database is based on SQLSERVER and contains a full set of documents)
    2020-06-27 09:25:30下载
    积分:1
  • CCpuId100
    得到CPU信息的程序.不过好像不准.(Program which obtains CPU information, But it seems not so accuracy.)
    2002-04-19 09:18:04下载
    积分:1
  • simplecommtest
    一个多线程串口编程的test,简单而实用,适合工业控制(A multi-threaded programming serial port test, easy and practical for industrial control)
    2009-03-28 17:43:02下载
    积分:1
  • SingleTraverseAdjust
    测绘MFC程序,打开导线计算数据并实现单根导线的计算并输出计算文件(附数据格式实例)(MFC mapping program, open wire calculate data and calculated to achieve a single wire and outputs the calculation file (with data format examples))
    2015-11-26 22:27:29下载
    积分:1
  • ColorSel
    很特别的彩色画笔,不需要画板,在任何平面都可以书写,全部代码.(very special color brush, and not slate, in any plane can write all the code.)
    2006-11-10 15:21:00下载
    积分:1
  • aec_miket
    a wide spread network protocol programming.it has been taken from itu web site freely.(a wide spread network protocol programmin g.it has been taken from the web site freely itu.)
    2007-04-16 23:05:04下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载