-
1 。 LightOJ 1234 打表法(数据太大,把数据缩小
原题链接http://lightoj.com/volume_showproblem.php?problem=1234 Description In mathematics, the n th harmonic number is the sum of the reciprocals of the first n natural numbers: In this problem, you are given n , you have to find H n . Input Input s...
2018-06-17 23:55:34
-
埃及分数问题_迭代加深搜索_C++
一、题目背景 http://codevs.cn/problem/1288/ 给出一个真分数,求用最少的1/a形式的分数表示出这个真分数,在数量相同的情况下保证最小的分数最大,且每个分数不同。 如19/45=1/3 + 1/12 + 1/180 二、迭代加深搜索 迭代加深搜索可以看做带深度限制的DFS。 首先设置一...
2018-06-17 23:55:33
-
最小生成树模板
prim: #includeiostream #include cstdio #include cstring #include algorithm using namespace std; const int inf= 1000000 ; const int maxn= 105 ; int mat[maxn][maxn],dis[maxn]; bool vis[maxn]; int n,ans; bool prim(){ memset(vis, 0 , sizeof (vis)); for...
2018-06-17 23:55:25
-
c/c++笔记--2
当你有一个变量,但你不能够确定用来指向某个对象,还是不指向任何对象时,应当使用pointer,因为reference必须总是代表某个对象,因此pointer可以设定为NULL,但是reference不能够设定为NULL。 但是, char *p = NULL; char r = *p; 以上行为会造成不可预测的结果,可...
2018-06-17 23:55:25
-
POJ 1775 Sum of Factorials 数论,基础题
输入一个小于1000000的正整数,是否能表达成式子:a1!+a2!+a3!+...+an (a1~an互不相等)。 因为10!1000000,所以先打1~10的阶乘表。从a[10]开始递减判断。(a[0]=0!=1) #include iostream #include cstdio #include cstring using namespace std; int main(){ // freopen...
2018-06-17 23:55:23
-
1 . Robberies (hdu 2955)
The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become too greedy. He has decided to work in the lucrative business of bank robbery only for a short while,...
2018-06-17 23:55:23
-
C/C++ 一些常用的运算符
算数运算符 语法 解释说明举例 a + b 加法(求和)1+1..2+2.. 2.5+2.5..等等 a - b 减法(求差)5 - 2.. a * b 乘法(求积)2 * 5 a / b 除法(分子)10 / 5 a % b 模数(余数)9 % 2 a++ 后自加先参与运算,再自增 ++a 先自加先自增,再参与运算 a-- 先赋值 后减a使用...
2018-06-17 23:55:16
-
bzoj2395[Balkan 2011]Timeismoney最小乘积生成树
所谓最小乘积生成树,即对于一个无向连通图的每一条边均有两个权值xi,yi,在图中找一颗生成树,使得xi*yi取最小值。 直接处理问题较为棘手,但每条边的权值可以描述为一个二元组(xi,yi),这也就不难想到将生成树转化为平面内的点,x代表xi,y代表yi(注意这里的xi,...
2018-06-17 23:54:53
-
OpenGL显示图片
...
2018-06-17 23:55:06
-
SGI STL中内存池的实现
最近这两天研究了一下SGI STL中的内存池, 网上对于这一块的讲解很多, 但是要么讲的不完整, 要么讲的不够简单(至少对于我这样的初学者来讲是这样的...), 所以接下来我将把我对于对于SGI STL的理解写下来, 方便以后查阅同时也希望能够对像我一样刚刚接触C++的初学者提供...
2018-06-17 23:55:08
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash




