概率定义假设随机试验E的空间样本为S,如果对于每一个S中的事件A都有一个实数P(A)与之对应,且满足以下3条公理,则称实数P(A)为事件A的概率。公理1P(A)≥0公理2P(S)=1公理3若事件A1、A2、A3、...、An...互不相容,则P(A1+A2+A3+...+An+...)=P(A1)+...
分类:
其他好文 时间:
2015-04-23 23:26:27
阅读次数:
252
概率论与数理统计复习第一章概率论的基本概念一.基本概念随机试验E:(1)可以在相同的条件下重复地进行;(2)每次试验的可能结果不止一个,并且能事先明确试验的所有可能结果;(3)进行一次试验之前不能确定哪一个结果会出现.样本空间S: E的所有可能结果组成的集合. 样本点(基本事件):E的每个结果.随机...
分类:
其他好文 时间:
2015-04-21 12:44:58
阅读次数:
280
题目描述:
输入一个正整数N,输出N的阶乘。
输入:
正整数N(0
输出:
输入可能包括多组数据,对于每一组输入数据,输出N的阶乘
样例输入:
4
5
15
样例输出:
24
120
1307674368000
来源:
2006年清华大学计算机研究生机试真题
#include
#include
#include
//不超时的代码
u...
分类:
其他好文 时间:
2015-04-13 19:05:39
阅读次数:
122
题目链接:maximal-rectangle
import java.util.Arrays;
/**
* Given a 2D binary matrix filled with 0's and 1's,
* find the largest rectangle containing all ones and return its area.
*
*/
public cl...
分类:
其他好文 时间:
2015-04-12 13:28:40
阅读次数:
189
题目连接:点击打开链接
解题思路:
不可以用cin,会超时
完整代码:
#include
#include
#include
#include
#include
using namespace std;
const int INF = 1000000000;
const int maxn = 10001;
char s[maxn];
int main()
{
#i...
分类:
其他好文 时间:
2015-04-05 16:06:56
阅读次数:
168
题目连接:点击打开链接
解题思路:
模拟
完整代码:
#include
#include
#include
#include
#include
using namespace std;
const int INF = 1000000000;
const int maxn = 10001;
char a[maxn] , b[maxn];
void MyStrcat(ch...
分类:
其他好文 时间:
2015-04-05 14:39:45
阅读次数:
127
题目连接:点击打开链接
解题思路:
简单暴力
完整代码:
#include
#include
#include
#include
#include
using namespace std;
int n;
int a[300];
bool check(int key)
{
set s;
s.clear();
for(int i = 1 ; i <...
分类:
其他好文 时间:
2015-04-05 13:24:23
阅读次数:
170
题目连接:点击打开链接
解题思路:
暴力
完整代码:
#include
#include
#include
#include
#include
using namespace std;
const int INF = 1000000000;
string s;
int main()
{
#ifdef DoubleQ
freopen("in.txt" , "...
分类:
其他好文 时间:
2015-04-05 13:22:34
阅读次数:
177
题目描述:
对于一个不存在括号的表达式进行计算
输入:
存在多种数据,每组数据一行,表达式不存在空格
输出:
输出结果
样例输入:
6/2+3+3*4
样例输出:
18
来源:
2010年上海交通大学计算机研究生机试真题
#include
using namespace std;
int main()
{
char ch;
...
分类:
其他好文 时间:
2015-04-04 09:23:34
阅读次数:
127
这一轮答的并不理想,很有可能挂掉。回来之后自己又答了一遍,没有参考任何资料,居然全部答上了。到底还是自己的基本功不扎实,遇见没做过的东西,没有调试环境就慌了,再努力提高吧。一、实现jsonp,传入URL,callback和callbackName 三个参数我先说下思路,jsonp是借由script标...
分类:
其他好文 时间:
2015-04-03 20:56:52
阅读次数:
209