My solution is as folllowing.

This integration is hard to solve. I googled it, and found the result is 1/3*ln(1+sqrt(2)) + 1/15*(2+sqrt(2)) = 0.52140543..

please see the link below.

http://mathworld.wolfram.com/SquareLinePicking.html

http://www.stat.columbia.edu/~liam/teaching/4109-fall10/chapter4.pdf

Pick two points at random from the interior of a unit square, what is the expected distance between them?的更多相关文章

  1. 《Focus On 3D Terrain Programming》中一段代码的注释二

    取自<Focus On 3D Terrain Programming>中的一段: bool CTERRAIN::MakeTerrainFault( int iSize, int iIter ...

  2. LeetCode 528. Random Pick with Weight

    原题链接在这里:https://leetcode.com/problems/random-pick-with-weight/ 题目: Given an array w of positive inte ...

  3. [LeetCode] Random Point in Non-overlapping Rectangles 非重叠矩形中的随机点

    Given a list of non-overlapping axis-aligned rectangles rects, write a function pick which randomly ...

  4. python入门(四):字符串、编码、random

    1.字符串 字符串基本有两种类型,str和bytes >>> s="a" >>> type(s) <class 'str'>     ...

  5. day 5 模块导入、常用模块os shutil sys commands subprocess hashlib json pickle zipfile traceback random datetime

    os: os.getcwd() 获取当前工作目录,即当前python脚本工作的目录路径 os.chdir("dirname") 改变当前脚本工作目录:相当于shell下cd os. ...

  6. Time vs Story Points Estimation [转]

    One of the most common questions we get is whether to estimate in time or points. It seems like poin ...

  7. CodeForces 577E Points on Plane(莫队思维题)

    题目描述 On a plane are nn points ( x_{i}xi​ , y_{i}yi​ ) with integer coordinates between 00 and 10^{6} ...

  8. 算法教程(3)zz

    First off, we can use our Line-Point Distance code to test for the "BOUNDARY" case. If the ...

  9. (转)Let’s make a DQN 系列

    Let's make a DQN 系列 Let's make a DQN: Theory September 27, 2016DQN This article is part of series Le ...

随机推荐

  1. QT:不规则窗口的实现

    主要思路:1:将窗体设为Qt::FramelessWindowHint(去掉标题栏).2:用一幅有部分区域是透明的图片作为程序的界面,并将图片透明的地方设为穿透. 3:重载程序的鼠标事件. 运行时截图 ...

  2. android ids.xml资源的使用

    ids.xml文件例子: XML file saved at res/values/ids.xml: 使用方式: 一:

  3. git “bad index file sha1 signature fatal: index file corrupt”错误

    在执行commit或revert等操作时,提示“bad index file sha1 signature fatal: index file corrupt”错误,导致操作失败.这是由于git的in ...

  4. 如何消除word中的回车符号

    打开文字编辑页面,在菜单栏上选择工具-选项-视图-格式标志中的“段落标志”复选框前面的“√”去掉即可.  附件:

  5. HDU_2047——EOF字符串排序排列问题,递推

    Problem Description 今年的ACM暑期集训队一共有18人,分为6支队伍.其中有一个叫做EOF的队伍,由04级的阿牛.XC以及05级的COY组成.在共同的集训生活中,大家建立了深厚的友 ...

  6. HDU_2015——偶数求和

    Problem Description 有一个长度为n(n<=100)的数列,该数列定义为从2开始的递增有序偶数,现在要求你按照顺序每m个数求出一个平均值,如果最后不足m个,则以实际数量求平均值 ...

  7. Java枚举7常见种用法

    DK1.5引入了新的类型——枚举.在Java中它虽然算个“小”功能,却给我的开发带来了“大”方便. 方法/步骤 用法一:常量 在JDK1.5之前,我们定义常量都是:publicstaticfianl. ...

  8. hdu 4746 Mophues

    莫比乌斯反演.先初始化出所有数有多少个质因子和mobius.然后处理mob_sum[ i ][ j ],表示当公因子的因子个数小于等于 j 个的mobius前 i 项和.然后分块求和即可. 分块处理部 ...

  9. JS浏览器对象-Screen对象

    代码: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title ...

  10. codeforces Arrival of the General 题解

    A Ministry for Defense sent a general to inspect the Super Secret Military Squad under the command o ...