题意:每次筛三个骰子面分别为k1,k2,k3,如果三个骰子的值分别为a,b,c则得分置0,否则得到分数加上三个骰子的值的和,如果得分大于等于n则结束游戏。设E[i]表示当前得到i分时结束游戏的期望。则E[i]=sum{Pk*(E[i+k]+1)|k为三个骰子可能取得的分数且不包括a,b,c这种情况}...
分类:
其他好文 时间:
2014-05-23 11:48:09
阅读次数:
303
There are N children standing in a line. Each child is assigned a rating value.
You are giving candies to these children subjected to the following requirements:
Each child must have at least one candy.
Children with a higher rating get more candies than...
分类:
其他好文 时间:
2014-05-22 11:00:49
阅读次数:
285
DWORD WINAPI mythread( LPVOID lpParameter) //客户线程{ struct My my; memcpy(&my,lpParameter,sizeof(My)); printf("One client connect!\n"); char str1; ......
分类:
其他好文 时间:
2014-05-22 06:31:02
阅读次数:
319
1 综述Separating touching objects in an image is one
of the more difficult image processing operations. The watershed transform is
often applied to this...
分类:
其他好文 时间:
2014-05-22 04:27:23
阅读次数:
497
1.删除短信的函数,一条一条的删除所有短信/* * Delete all SMS one by one
*/ public void deleteSMS() { try { ContentResolver CR = getContentResolver();...
分类:
移动开发 时间:
2014-05-22 01:45:15
阅读次数:
444
Definitions:?StressTests the server –Peak volume
over a short span of time?LoadTests the database –Largest load the database can
handle at one time?Vo...
分类:
其他好文 时间:
2014-05-22 01:29:01
阅读次数:
338
#include #include #include using namespace std;int
main(){ int n; while(cin >> n) { stack one; string od1,od2; bool stat...
分类:
其他好文 时间:
2014-05-21 23:48:58
阅读次数:
370
【题目】
Write a program to solve a Sudoku puzzle by filling the empty cells.
Empty cells are indicated by the character '.'.
You may assume that there will be only one unique solution.
A sudoku puzzle...
...and its solution numbers marked in red.
...
分类:
其他好文 时间:
2014-05-20 17:07:34
阅读次数:
335
题目:
Given an array of integers, every element appears
three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implem...
分类:
其他好文 时间:
2014-05-20 16:22:52
阅读次数:
241
戳我去解题Given a non-negative number represented as an
array of digits, plus one to the number.The digits are stored such that the most
significant digit ...
分类:
其他好文 时间:
2014-05-20 10:42:14
阅读次数:
244