码迷,mamicode.com
首页 >  
搜索关键字:le    ( 2309个结果
Sdoi2015约数个数和题解莫比乌斯反演
题目描述 T组数据,求ΣNi=1ΣMj=1d(ij)\Sigma_{i=1}^N\Sigma_{j=1}^Md(ij),d(x)d(x)代表x的约数个数。 1≤N,M,T≤1051\le N, M,T\le 10^5 题解 首先,膜拜一下PoPoQQQ大神及其题解 然后,有一个神奇的结论:ΣNi=1ΣMj=1d(ij)\Sigma_{i=1}^N\Sigma_{j=1}^Md(ij)=ΣNi=1ΣM...
分类:其他好文   时间:2015-08-20 17:02:42    阅读次数:120
计算字符串的字符数和查找几个字符串中是否含有特定字符
代码来自于《C与指针》关于指针的介绍知识点:指针数组越界 #define NULL (void*)0 代码量的积累很重要! 代码量的积累很重要! 代码量的积累很重要!#include//#include#includechar str[] = "ABCDEFG";size_t str_le...
分类:其他好文   时间:2015-08-20 15:15:26    阅读次数:148
BZOJ 3925 [Zjoi2015]地震后的幻想乡
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=3925题意:给定一个nn点mm边的无向图,没有重边和自环,每条边的权值为[0,1][0,1]之间的随机变量,求最小生成树中最大边的期望权值。 n≤10,m≤n?(n?1)2n\le10,m\le\frac{n*(n-1)}{2}。题解:根据期望的线性性,我们可以算出随机选前k小的那些边使图恰好...
分类:其他好文   时间:2015-08-20 01:34:14    阅读次数:156
[LeetCode] Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:其他好文   时间:2015-08-19 13:14:00    阅读次数:134
POJ 4012
题目链接:http://poj.org/problem?id=4012 Problem B. Black Square Input ?le: black.in Output ?le: black.out Time limit: 3 seconds Memory limit: 256 megabytes Inspired by Kazimir Malevic...
分类:其他好文   时间:2015-08-19 00:43:57    阅读次数:150
SSIS ->> Package Restartability Fullfilled By Checkoints
Checkpoints are the foundation for restarting packages in SSIS, and they work by writing state information to a ?le after each task completes.This ?le...
分类:其他好文   时间:2015-08-18 15:31:06    阅读次数:92
蓝牙模块与手机通信
1、通信前必须具备东西: (1)  蓝牙串口模块; (2)  安卓系统并带有蓝牙的手机; (3)  串口调试软件; (4)  蓝牙测试软件;   配置蓝牙串口模块: 这里把蓝牙串口模块配置成从机模式,具体设置过程如下: (1)  让蓝牙串口模块进入命令设置状态,具体操作是:按着模块上唯一的按键不放,用USB接口给模块上电,这时正确的情景是模块上的LE...
分类:移动开发   时间:2015-08-17 15:40:59    阅读次数:209
LeetCode:Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:其他好文   时间:2015-08-17 11:37:33    阅读次数:123
零基础学python-4.4 常用的一些内建函数
1.对比两个对象,在2.x的时候我们使用cmp,但是在3.x的时候,我们使用的是operator模块里面的函数 import operator operator.lt(a, b) operator.le(a, b) operator.eq(a, b) operator.ne(a, b) operator.ge(a, b) operator.gt(a, b) operator.__lt...
分类:编程语言   时间:2015-08-17 01:04:51    阅读次数:133
[problem]Runtime error
今天在刷Multiply Strings一题时,一直出现runtime error,找了很久都没找到问题。找了一个小时,是在扛不住了,问师兄了,一眼看出问题是new int(len1)这儿出了问题,导致数组越界了。创建一个数组是int *array=new int[length],创建一个长度为le...
分类:其他好文   时间:2015-08-16 21:20:17    阅读次数:126
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!