08 2016 档案

bzoj1036: [ZJOI2008]树的统计Count 树链剖分
摘要:1036: [ZJOI2008]树的统计Count Description 一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w。我们将以下面的形式来要求你对这棵树完成 一些操作: I. CHANGE u t : 把结点u的权值改为t II. QMAX u v: 询问从点u到点v的路径上的节 阅读全文

posted @ 2016-08-31 16:25 disppr 阅读(161) 评论(0) 推荐(0)

Poj1325 Machine Schedule 最大二分图匹配 匈牙利算法
摘要:Machine Schedule Description As we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long h 阅读全文

posted @ 2016-08-18 11:40 disppr 阅读(205) 评论(0) 推荐(0)

Poj1064Cable master 二分
摘要:Cable master Description Inhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and 阅读全文

posted @ 2016-08-17 15:42 disppr 阅读(124) 评论(0) 推荐(0)

VijosP1208欧几里德的游戏 博弈
摘要:欧几里德的游戏 题目描述 欧 几里德的两个后代Stan和Ollie正在玩一种数字游戏,这个游戏是他们的祖先欧几里德发明的。给定两个正整数M和N,从Stan开始,从其中较大的一 个数,减去较小的数的正整数倍,当然,得到的数不能小于0。然后是Ollie,对刚才得到的数,和M,N中较小的那个数,再进行同样 阅读全文

posted @ 2016-08-17 13:26 disppr 阅读(498) 评论(0) 推荐(0)

Poj2992Divisors 组合数求因子的个数
摘要:Divisors Description Your task in this problem is to determine the number of divisors of Cnk. Just for fun -- or do you need any special reason for su 阅读全文

posted @ 2016-08-17 10:58 disppr 阅读(224) 评论(0) 推荐(0)

Poj1011 Sticks 小木棍dfs搜索
摘要:Sticks Description George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return st 阅读全文

posted @ 2016-08-13 15:17 disppr 阅读(780) 评论(0) 推荐(3)

Codeforces Round #367 (Div. 2) D. Vasiliy's Multiset stl+位运算解法
摘要:D. Vasiliy's Multiset time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Author has gone ou 阅读全文

posted @ 2016-08-13 13:50 disppr 阅读(212) 评论(0) 推荐(0)

阶乘的最右边的非零位的值
摘要:阶乘问题 题目描述 也许你早就知道阶乘的含义,N阶乘是由1到N相乘而产生,如: 12! = 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 x 11 x 12 = 479,001,600 12的阶乘最右边的非零位为6。 写一个程序,计算N(1<=N<=50,000,00 阅读全文

posted @ 2016-08-11 19:34 disppr 阅读(1307) 评论(1) 推荐(0)

Eular质数筛法模板
摘要:hihoCoder有一期专门讲解Eular质数筛法, 传送门 阅读全文

posted @ 2016-08-04 21:43 disppr 阅读(185) 评论(0) 推荐(0)

邮票问题
摘要:【回溯】邮票问题 题目描述 设有已知面额的邮票m种,每种有n张。问:用总数不超过n张的邮票进行组合,能组合的邮票中可以连续出现面额数最多有多少(1<=m<=100,1<=n<=100,1<=邮票面额<=255) 输入 第一行:n和m的值,中间有一空格隔开 第二行:m种邮票的面额,每个数中间用一空格隔 阅读全文

posted @ 2016-08-04 16:00 disppr 阅读(436) 评论(0) 推荐(0)