摘要:1036: [ZJOI2008]树的统计Count Description 一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w。我们将以下面的形式来要求你对这棵树完成 一些操作: I. CHANGE u t : 把结点u的权值改为t II. QMAX u v: 询问从点u到点v的路径上的节
阅读全文
摘要: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
阅读全文
摘要:Cable master Description Inhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and
阅读全文
摘要:欧几里德的游戏 题目描述 欧 几里德的两个后代Stan和Ollie正在玩一种数字游戏,这个游戏是他们的祖先欧几里德发明的。给定两个正整数M和N,从Stan开始,从其中较大的一 个数,减去较小的数的正整数倍,当然,得到的数不能小于0。然后是Ollie,对刚才得到的数,和M,N中较小的那个数,再进行同样
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:阶乘问题 题目描述 也许你早就知道阶乘的含义,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
阅读全文
摘要:hihoCoder有一期专门讲解Eular质数筛法, 传送门
阅读全文
摘要:【回溯】邮票问题 题目描述 设有已知面额的邮票m种,每种有n张。问:用总数不超过n张的邮票进行组合,能组合的邮票中可以连续出现面额数最多有多少(1<=m<=100,1<=n<=100,1<=邮票面额<=255) 输入 第一行:n和m的值,中间有一空格隔开 第二行:m种邮票的面额,每个数中间用一空格隔
阅读全文