码迷,mamicode.com
首页 >  
搜索关键字:random walk    ( 8169个结果
剪刀石头布
import java.util.Scanner;public class Game { public static void main(String[] args){ int r; r = (int) (Math.random()*2 + 1); S...
分类:其他好文   时间:2014-08-07 18:10:10    阅读次数:159
把随机得到的数,个十百位分别相加
import java.util.Random;import javax.swing.JOptionPane;public class Numbers { public static void main(String[] args){ double digit; d...
分类:其他好文   时间:2014-08-06 18:11:31    阅读次数:208
[leetcode]Copy List with Random Pointer
Copy List with Random PointerA linked list is given such that each node contains an additional random pointer which could point to any node in the lis...
分类:其他好文   时间:2014-08-06 17:44:31    阅读次数:225
周赛 POJ 3934 Queue
Description Linda is a teacher in ACM kindergarten. She is in charge of n kids. Because the dinning hall is a little bit far away from the classroom, those n kids have to walk in line to the dinnin...
分类:其他好文   时间:2014-08-06 10:37:51    阅读次数:257
VS2012开发cocos游戏遇到问题汇总
1、编译成android时,需要修改jni/android.mk,每个cpp都修改一下太麻烦,可以让他自动识别。 # 遍历目录及子目录的函数 define walk $(wildcard $(1)) $(foreach e, $(wildcard $(1)/*), $(call walk, $(e))) endef # 遍历Classes目录 ALLFILES...
分类:其他好文   时间:2014-08-05 15:58:19    阅读次数:224
os模块实现遍历文件
使用OS模块中的walk实现文件遍历。walk(top, topdown=True, onerror=None, followlinks=False)从官方提供的doc中看到有四个参数1>参数top表示需要遍历的目录树的路径2>参数topdown的默认值是"True",表示首先返回目录树下的文件,然...
分类:其他好文   时间:2014-08-05 15:45:59    阅读次数:217
mongodb学习(六)索引
准备工作: 先插入100万条数据for(i=0;i<=1000000;i++){ db.users.insert({ "i":i, "username":"user"+i, "age":Math.floor(Math.random()...
分类:数据库   时间:2014-08-05 13:54:29    阅读次数:268
HDU 4790 Just Random 数学
链接:http://acm.hdu.edu.cn/showproblem.php?pid=4790 题意:从【a,b】中随机找出一个数字x,从【c,d】中随机找出一个数字y,给出p,m,如果(x+y)%p==m则算成功,问成功的概率是多少。 思路:【a,b】中连续p个数,【c,d】中连续p个数,用这2*p个数进行组合能找到p种的成功组合(具体不证),所以找到【a,b】中p循环的个数x1,【c,...
分类:其他好文   时间:2014-08-05 11:19:29    阅读次数:166
Radio Link Failure and Recovery
四种会发生Radio Link Failure的场景- DL Physical Layer Failure (PDCCH BLER > 10%)- Random Access Problems (in Connected State)- Failure after RLC retransmissio...
分类:其他好文   时间:2014-08-05 00:08:48    阅读次数:363
随机颜色-js
function ramColor() { return '#' + ('00000' + (Math.random() * 0x1000000 << 0).toString(16)).slice(-6); }
分类:Web程序   时间:2014-08-04 21:00:58    阅读次数:260
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!